Skip to main content
Every error has the same body. Branch on error. Show message to a person.

Codes

Retry

Read retryable. Do not infer it from the status.
  • true: wait retry_after seconds when present, else a short backoff, then send the same request again.
  • false: the same request fails the same way. Change the request, key, balance or id first.

One turn at a time

A task runs one turn at a time. 409 task_executing on continue or execute: poll state until the turn ends, then send again. Serialize calls per task_id. Do not stop a turn to get a message through; stop abandons its work.

Terminal errors

402 out_of_credits on continue or execute means the turn did not start. The task stays in plan and does not resume when credits arrive: add credits, then send the request again. See Task lifecycle.

Streaming

After an SSE stream opens, a failure arrives as a beanstalk_error event, not an HTTP status. See Live messages.