Skip to content

Errors

Every Rayfold error has a code from a fixed list, the same in every API, so retries, alerts and status codes work the same way everywhere. Errors an operation declares in the schema, such as OutOfStock, use the code domain and carry their own type and data.

When a whole request is refused over HTTP, the answer is an RFC 9457 problem document whose type links to one of these pages.

TypeHTTPRetry?Meaning
invalid_argument400noThe request does not match the schema, so nothing ran.
failed_precondition400noThe request is valid, but the data is not in the state the operation needs.
out_of_range400noThe operation went past the end of what exists, such as reading beyond the last item.
unauthenticated401noThe server could not tell who is calling.
permission_denied403noThe server knows who is calling, and they are not allowed to do this.
not_found404noWhat the request names does not exist, or the caller is not allowed to know that it does.
already_exists409noThe command would create something that is already there.
aborted409yesThe operation was stopped by a conflict with another one running at the same time.
resource_exhausted429noThe request is over a limit the server enforces.
payload_too_large413noThe request body is bigger than the server accepts. Nothing was read past the limit and nothing ran.
unsupported_media_type415noThe request body is in a format this endpoint does not read.
canceled499noThe caller stopped the request before it finished.
unimplemented501noThis server does not support the operation or feature the request uses.
unavailable503yesThe server or something it depends on is down for the moment.
deadline_exceeded504yesThe request's deadline passed before the server finished.
domain422noAn error the schema declares for this operation, such as `OutOfStock`. It arrives with a `type` and its data.
internal500noSomething went wrong inside the server. The details stay in its logs.
unknown500noAn error came from somewhere that did not say what kind it was.
data_loss500noData was lost or corrupted, and the server could not recover it.

Commands can always be sent again with the same idempotency key: if the first attempt went through, the server answers with its original result instead of running the command twice.

Released under the Apache-2.0 license.