disburse / docs

Errors

Every error, on the REST API and the MCP server alike, uses one JSON envelope with a stable, machine-readable code:

json
{ "error": { "code": "invalid_request", "message": "Malformed JSON body" } }

Branch on code, not on the human-readable message (which may change).

Codes

CodeHTTPMeaning
invalid_request400Malformed body or invalid parameters
unauthorized401Missing, unknown, disabled, or exhausted key
unparseable_query422The natural-language query couldn't be understood
rate_limited429Too many requests, see Rate limits
no_data404The request was valid but matched nothing
not_found404Unknown route
method_not_allowed405Wrong HTTP method for the route
timeout504An upstream lookup exceeded its deadline
unavailable503A dependency was temporarily unreachable
internal500Unexpected server error

Retrying

  • rate_limited and timeout are transient; retry after a short backoff. rate_limited responses include a Retry-After header.
  • unavailable is also transient; back off and retry.
  • invalid_request, unauthorized, and unparseable_query are your side, fix the request rather than retrying it.
  • no_data isn't a failure: the query was fine, there just wasn't a match.