Problems
The errors the Postforge API answers, as RFC 9457 problem details, and what to do about each.
Every error the API answers is a problem details object (RFC 9457) with Content-Type: application/problem+json:
{
"type": "https://postforge.dev/developers/problems/forbidden",
"title": "You can’t do this",
"status": 403,
"detail": "This needs a key with the write scope.",
"code": "scope"
}| Field | Meaning |
|---|---|
type | The kind of problem: a link to its page below |
title | The kind in words; the same for every problem of a kind |
status | The HTTP status |
detail | What went wrong and what to do, written for people: safe to show in your UI |
code | A finer reason within the kind, for your code to branch on |
errors | Validation only: one { path, message } per invalid field |
Branch on type and code, show detail. New codes can appear within a kind at any time, so treat an unknown code like its kind.
| Kind | Status | Title |
|---|---|---|
validation | 400 | The request isn’t valid |
unauthenticated | 401 | Sign in to continue |
forbidden | 403 | You can’t do this |
not-found | 404 | Not found |
conflict | 409 | This conflicts with the current state |
gone | 410 | No longer available |
business-rule | 422 | This isn’t allowed |
rate-limited | 429 | Too many requests |
internal | 500 | Something went wrong |