Contents

Errors

A failed call answers with an HTTP status and a JSON body holding an error object: a stable code to branch on, a message a person can read, and sometimes details.

The error envelope

402, for example
{
  "error": {
    "code": "SUBSCRIPTION_PAYMENT_REQUIRED",
    "message": "Your last payment didn't go through. Update your payment method to keep using Scaffold.",
    "details": {
      "reason": "payment"
    }
  }
}

Branch on the code; the message is written for a person to read.

Codes

34 documented