The problem document every failed request returns, and every error code the webhooks API uses.

The problem document

Every failure is an RFC 9457 problem document, sent as application/problem+json:

{
  "type": "https://docs.digitospace.com/problems/conflict",
  "title": "Conflict",
  "status": 409,
  "code": "delivery_not_waiting",
  "detail": "only a delivery that is waiting to be sent can be cancelled",
  "instance": "/v1/projects/01k5ztq3jb9y2a1m9v2xw8e0ha/deliveries/01m3my2c7hq0n5d2x8f4k6s9ta/cancel",
  "requestId": "01m3c081dbf3j55x7hsa7wc1yj",
  "retryable": false
}

Handle a failure

  • type links to a page about that kind of problem. See Problems.
  • code is the contract. Branch on it. It changes only with a deprecation.
  • type and status are the class of failure, for handling whole categories.
  • detail is a sentence for a person and may be reworded at any time.
  • retryable says whether the same request could succeed if sent again later.
  • resource names the missing thing on not_found, and the thing whose name is taken on hooks_name_taken.
  • issues lists every field that is wrong on validation_failed, each with a field, a code (required, too_long, out_of_range or invalid) and a message.

Codes

CodeStatusRetryableWhen
already_exists409noSomething with that identity already exists
conflict409noThe request clashes with the current state
delivery_not_waiting409noThe delivery is being sent, or has finished, so it cannot be cancelled
forbidden403noThe key or your access does not allow this in the project
hooks_limit_reached403noThe project already holds 100 sources, 100 destinations, or 200 connections; delete some to add more
hooks_name_taken409noAnother source or destination in the project has that name, ignoring case
internal500noSomething went wrong on our side
invalid_request400noThe request is malformed: a bad ID, cursor, limit, status, or JSON body
method_not_allowed405noThe route exists but not for that method; see Allow
not_found404noThe route, project, source, destination, connection, event, or delivery does not exist
payload_too_large413noThe body is over 1 MB
unauthenticated401noThe bearer token is missing or not one we accept
unavailable503yesSomething the request depends on is not available right now
unsupported_media_type415noThe body is not application/json
validation_failed422noFields are wrong, such as a filter or transformation we cannot use; see issues

Last updated