You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The live V1 API still has canonical and legacy error envelopes. Until OilpriceAPI/oilpriceapi-api#4083 completes, Python callers should not need endpoint-specific parsing.
Required outcome
Every non-2xx response becomes one stable typed SDK exception while preserving raw diagnostics.
Acceptance criteria
Typed model includes HTTP status, machine code, message, request ID, docs URL, current plan, required plan/feature, remediation URL, retry metadata, and raw body.
Parse the canonical nested error object.
Normalize legacy flat error, error_code, code, message, and malformed/non-JSON bodies.
Useful subclasses or predicates for 400/401/402/403/404/429/5xx without losing the shared base contract.
Preserve headers and raw text for support output; never include the API key.
Cover canonical/legacy fixtures plus timeout/network failures.
Update README/reference examples with safe recovery and request-ID reporting.
Pin contract fixtures so compatibility branches can be deleted after backend migration.
Problem
The live V1 API still has canonical and legacy error envelopes. Until OilpriceAPI/oilpriceapi-api#4083 completes, Python callers should not need endpoint-specific parsing.
Required outcome
Every non-2xx response becomes one stable typed SDK exception while preserving raw diagnostics.
Acceptance criteria
errorobject.error,error_code,code,message, and malformed/non-JSON bodies.Priority
P1 developer trust. Source: CX Fix Punch List, 2026-07-17.