Overview
POST/processing/jobs/{id}/failprocessing

Record a job failure

Records an error and either re-queues the job with exponential backoff (when retry:true and attempts remain) or moves it to dead. Returns 404 when the lease guard fails.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • idpathstring
Request body

application/json · optional

  • leaseTokenstring

    Opaque lease token returned by /claim

  • errorstring

    Human-readable error stored as last_error

  • retryoptionalboolean

    Re-queue if attempts remain (default true)

Example
{
  "leaseToken": "string",
  "error": "string",
  "retry": true
}
Responses
200

Failure recorded; retry info

  • willRetryboolean

    True when the job was re-queued

  • runAtoptionalstring?

    Scheduled re-run timestamp (null when dead)

Example
{
  "willRetry": true,
  "runAt": "string"
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
404

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/processing/jobs/{id}/fail" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "leaseToken": "string",
  "error": "string",
  "retry": true
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/processing/jobs/{id}/fail", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"leaseToken\": \"string\",\n  \"error\": \"string\",\n  \"retry\": true\n}",
});
const data = await res.json();