foliot docs

API reference / Tasks / Fail a task out of band

Fail a task out of band

POST/apps/{appId}/tasks/fail

Goes through the same retry decision as a synchronous failure, so reporting a failure out of band is treated identically to responding with an error. retryable: false is believed, and ends the attempt chain immediately. Like a completion, a failure that arrives before Foliot has recorded your 202 is a 409 that leaves the token unspent: send it again. The body is closed: a key the server does not know is a 400, so a misspelled retryable is refused rather than silently dropped.

Path parameters

appId
string
REQUIRED

The app's id, not its name, returned as app.id when the app is created. The id never changes.

Request body

error
object
REQUIRED
token
string (uuid)
REQUIRED

The task token from the task request or the poll.

Responses

200 object OK
400 Error Invalid request.
401 Error Missing, malformed or unknown bearer token.
403 Error The token is valid but not permitted on this route.
404 Error No such resource.
409 Error Conflicts with existing state.
503 Error A dependency this route needs is unreachable.