error. Show message to a person.
Success codes
Task routes return two success codes. Both bodies carrytask_id.
Branch on the body’s
status field, not on the status code. Neither code means the turn finished. POST /task and POST /task/start return 202 when task_id names an existing task. POST /task/{task_id}/continue and POST /task/{task_id}/execute return 202 unless wait is true.
Codes
Retry
Readretryable. Do not infer it from the status.
true: waitretry_afterseconds 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 abeanstalk_error event, not an HTTP status. See Live messages.