Error Codes
The ODXProxy JSON-RPC error catalog and the two-step success check.
Every /api/* response is a JSON-RPC 2.0 envelope. result and error are
mutually exclusive:
{
"jsonrpc": "2.0",
"id": "<echoed request id>",
"result": "<any> | omitted",
"error": { "code": 0, "message": "...", "data": "<any> | omitted" }
}Catalog
| HTTP | JSON-RPC code | When |
|---|---|---|
| 200 | Odoo's own code | Odoo logic error (pass-through; data carries Odoo's payload). |
| 400 | -32001 | action not in the allowlist. |
| 400 | -32002 | call_method without fn_name. |
| 401 | -32000 | Missing/wrong x-api-key (id is null). |
| 403 | 0 | Proxy license expired/invalid. |
| 502 | -32004 | Network failure reaching Odoo. |
| 504 | -32003 | Upstream Odoo call timed out. |
| 500 | -32005 | Internal proxy error decoding Odoo's response. |
Do not infer success from the HTTP status alone
A 200 OK response can still contain an error object — Odoo logic errors
(validation, access-right denial) are returned this way. Clients must:
- If the HTTP status is not 200, treat it as a proxy-level failure and surface
the JSON-RPC
error. - If the status is 200, check whether
erroris set. If so, surface it; otherwise readresult.