Documentation

Guides, setup, and API reference

Documentation

Error Handling

Common response shapes and failure cases

API Errors

Error shape usually follows:

json
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "title is required",
    "details": null
  }
}

Some non-versioned attachment upload/download routes return simpler shape:

json
{
  "error": "Upload session not found"
}

Common Codes

CodeMeaning
unauthorizedMissing or invalid session/token
validation_errorRequest body, params, or upload invalid
not_foundSnippet, attachment, or upload session missing
rate_limitedIn-memory rate limit exceeded
internal_errorUnexpected server error
service_unavailableReadiness check failed

Common Cases

Unauthorized

  • Missing bearer token
  • Invalid bearer token
  • No browser session

Validation error

  • Missing snippet title or code
  • Unsupported storage backend
  • Missing upload file
  • Invalid browser-login callback or code
  • Attachment MIME not allowed
  • Attachment exceeds 5 MB

Not found

  • Snippet belongs to another user
  • Attachment belongs to another user
  • Upload session expired or missing