Skip to content
Docs
Join the API waitlist

Errors and recovery

Find the code, decide whether to retry, and check whether the request has already used its cells.

Errors

Errors are RFC 9457 problem documents, and you should branch on code. The status appears in the body as well as on the response. Every error carries a request_id, which is also sent as the X-Request-Id header, and a retryable boolean that says whether sending the same request again can succeed. A 429 carries Retry-After in whole seconds, and so does a 503 from the service behind the front door, such as unavailable. A 503 the front door writes itself, such as not_ready or an upstream_unavailable when it could not reach a store or the endpoint, carries none: back off on your own. When Retry-After is present, wait that long. Successful responses carry X-Request-Id too, in the header only.

Two statuses need care before you resend. A 504 with code timeout means the prediction could not finish within the time the request waits and was stopped. It is not counted, but the same table would take as long again, so it carries retryable: false; send a smaller table. A 502 with code upstream_unavailable means the prediction ran, or may have, and its answer could not be read. When the service gave its cells back it says so and sets retryable: true, and a resend is charged once. Otherwise retryable is false and a resend may be charged again. The Python client never resends either status on its own, whatever the body says.

The type of every error is a link to its row in the API reference error table. The Python client raises one exception class for each group of statuses.

ExceptionStatusNotes
CausiloValidationError400, 406, 422Fix the request; the message names the column or field.
CausiloAuthError401, 403Check the key.
CausiloTooLarge413payload_too_large, request_too_large or response_too_large. Nothing was counted.
CausiloQuotaExceeded429 quota_exceededCarries scope, limit, used and resets_at.
CausiloRateLimited429 rate_limitedRaised after three retries, each after the Retry-After seconds, at most 30.
CausiloOverloaded429 without a codeA platform in front of a self-hosted container had no instance free. The parent class of CausiloRateLimited.
CausiloUnavailable502, 503, no connectionA 503 or a failed connection is retried three times first; a 502 is never retried.
CausiloTimeout504, or the client's own timeoutNever retried. After its own timeout the client cancels the request and sets refunded.
CausiloIncompleteResponse200, cut offA CausiloTimeout: the answer was cut off on the way. It ran and is counted.
CausiloErrorany otherThe base class of all of these, raised as itself for the rest, such as a 500 that still fails after three retries.
codestatusWhat happenedWhat to do
unauthorized401No key, a wrong key, or one that has been revoked.Check the key. A revoked key stops working within about a minute, or within 15 minutes while our key store is unreachable.
validation_failed422The tables or the params do not fit the contract.The detail names the column or field. Feature columns must match in name and order.
bad_request400The request could not be read: a body that could not be parsed at all, or a POST /v1/cancel without a usable X-Causilo-Cancel-Key.Check the content type and that both parts are present. For a cancel, send the key the request carried: 16 to 128 letters and digits.
empty_body400The request arrived with no body.Send the tables. A proxy that strips bodies will produce this.
payload_too_large413The body is over this deployment's ceiling.Send fewer rows, or store the context once and name it afterwards.
request_too_large413The table is over the row or cell cap, or would take longer than the deployment allows.The detail says how many context rows fit at your column count.
context_not_found404The stored context has expired or been released.Send the table again. The Python client does this for you.
quota_exceeded429A cell limit. For an issued key (scope: allowance) the account's cells no longer cover the request: its one-off allowance of 20,000,000 cells, usable for twelve months, and anything given to it. For an organisation's key it can also be the monthly limit an owner set for the member who created it or for its workspace.The body says which limit and what is used. allowance does not reset, so send a smaller table or write to api@nums.world for more cells; a member's or workspace's monthly limit resets on the first of the month, as resets_at says.
rate_limited429Too many requests in the minute or hour window. The cell caps are separate.Wait for the Retry-After seconds and resend.
response_too_large413The prediction is bigger than can be returned.Ask for fewer query rows. Nothing counts against your allowance.
not_ready503The service is starting or being replaced.Retry. This is not an error on your side.
unavailable503Usually the request was not started: the work already waiting for the GPU would outlast this request's wait, the GPU was busy for the whole wait, the service is short of memory or shutting down, its usage ledger was busy, its charge could not be recorded, or its GPU stopped working and it is being replaced. Rarely the run finished while the server was being replaced, and the answer was dropped and its charge given back.Retry after the Retry-After seconds. Nothing counts against your allowance.
upstream_unavailable502 or 503502: the prediction ran and its answer could not be read, or the endpoint did not confirm a request that may have run. Its cells are given back where the service still holds the charge (a run whose process died), and the detail says whether they were. 503: a store the service depends on, or the inference endpoint, could not be reached before the work started, and nothing counts.On a 503, retry: when it carries Retry-After, wait that long; one the front door writes itself carries none. On a 502, resend only when retryable is true: the charge came back, so the resend is charged once. Otherwise the cells may stand and a resend may be charged again; quote the request_id.
inference_failed500The prediction failed inside the service.Nothing counts against your allowance. Quote the request_id if it repeats.
client_gone499The caller disconnected before the answer was returned. Before the prediction started it is not run and nothing counts; after, it runs to the end and counts, and its answer is not kept.Recorded in the logs. You receive it only for a request whose cancel key was cancelled before the request arrived: it is not run and nothing counts.
cancel_key_in_use409Another request sent with the same X-Causilo-Cancel-Key is still running, or has already ended. Nothing was charged for this one.Send a new key with every request, retries included.
not_found404No such route.Check the path.
method_not_allowed405Wrong method for that route.Check the method.
timeout504The prediction could not finish within the time the request waits, so it was stopped. When its answer could not be read during the wait, the service cannot tell whether it ran, and the detail says so.Nothing counts against your allowance, except in that unread case: then it counts if it ran, so quote the request_id. Do not retry the same table; send a smaller one, or fewer rows at a time.