Errors

Errors & diagnostics

Obita APIs use a response envelope that includes code, msg, data, and timestamp.

Response envelope

{
  "code": "string",
  "msg": "string",
  "data": "object | array | null",
  "timestamp": 1730000000000
}
TODO – Requires Obita input: Define the error taxonomy:
  • What values can code take? (e.g., INVALID_ARGUMENT, UNAUTHORIZED, etc.)
  • How does code map to HTTP status codes?
  • Do you return a request_id for support and audits?

Debug checklist

CheckWhy it matters
Authentication headersMissing/invalid auth is the most common cause of 401/403.
Request payload schemaEnsure required fields are present and enums match (see Glossary).
IdempotencyRetry-safe create operations should use an idempotency key (TODO).
Timestamp / nonceRequired if Obita uses signed requests (TODO).
Support contextProvide timestamp, endpoint path, and request_id (TODO).