Skip to content
GbàlejòDocs

Guides

Errors

When a request fails, the answer is a problem: application/problem+json (RFC 9457) with a type you can act on, and a status that matches.

What a problem looks like

Response
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json

{
  "type": "https://gbalejo.com/problems/validation",
  "title": "Some fields need attention",
  "status": 422,
  "detail": "The request has fields that are missing or not valid.",
  "instance": "/api/v1/visits",
  "traceId": "6f1c2e0a-8d4b-4a7e-9c3f-5e2b7d1a9c16",
  "errors": [
    {
      "path": "visitors.0.email",
      "message": "Invalid email address",
      "code": "invalid_format"
    },
    {
      "path": "schedule.startTime",
      "message": "Use HH:MM (24-hour)",
      "code": "invalid_format"
    }
  ]
}
type
What went wrong: https://gbalejo.com/problems/<type>. Match on it, never on the title or detail, which are words for people and may change.
title
A short summary for people.
status
The HTTP status, the same as the answer’s.
detail
What happened this time, for people.
instance
The path that was called.
traceId
The request’s id, also in the X-Request-Id header. Send your own X-Request-Id (8–64 letters, digits, dots, dashes or underscores) and it is used instead; quote it when you write to us.
errors
For 422 validation only: each field that needs attention, with its path in the body or query ("visitors.0.email"), a message and a code.
limit, feature
For 402 plan-limit and 402 plan-feature: the limit reached ("monthlyVisits") or the feature missing ("api").

Problems on every route

The body is not JSON, or an id in the path is not a UUID.

No key was sent, or it is mistyped or unknown.

The key has been revoked.

The key has passed its expiry date.

The organisation’s plan does not include the API (feature: "api").

A payment is overdue: the organisation can read but not change anything until it is paid.

Gbàlejò has suspended the organisation.

The key does not have the route’s scope (or any of its scopes, where it takes several).

There is no such visit, employee or site, or no such route.

A field is missing or not valid: errors lists each one with its path.

The key has made its requests for this minute (Retry-After says when).

Your address made 2,400 requests this minute, over all its keys.

Something went wrong on our side: try again later, and quote the traceId if it lasts.

Each operation’s page lists the problems it can answer with, including its own (a schedule that has passed, an employee who already exists).

What to do

  • 4xx (but 409 and 429): the request needs changing. Sending it again unchanged gets the same answer.
  • 409 visit-changed: someone changed the visit at the same moment. Read it again, then decide.
  • 429: wait for Retry-After, then send it again (Rate limits).
  • 402 account-read-only: a payment is overdue. Reading still works; the owner can pay in Settings → Billing.
  • 5xx: try again later, waiting longer each time.