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
codetake? (e.g.,INVALID_ARGUMENT,UNAUTHORIZED, etc.) - How does
codemap to HTTP status codes? - Do you return a
request_idfor support and audits?
Debug checklist
| Check | Why it matters |
|---|---|
| Authentication headers | Missing/invalid auth is the most common cause of 401/403. |
| Request payload schema | Ensure required fields are present and enums match (see Glossary). |
| Idempotency | Retry-safe create operations should use an idempotency key (TODO). |
| Timestamp / nonce | Required if Obita uses signed requests (TODO). |
| Support context | Provide timestamp, endpoint path, and request_id (TODO). |