Error Codes

HTTP status codes and error payloads across all oracle endpoints.

Standard HTTP Codes

StatusMeaningAction
200Success — signed attestation returnedVerify signature, extract price from canonical
402Payment RequiredParse payment instructions and pay (L402 invoice or x402 USDC)
403Forbidden — address blockedPayment address has been hard-blocked due to repeated failures
404Not FoundInvalid endpoint path or DLC event ID not found
425Too Early (DLC only)Event announced but not yet attested — retry after maturity
502Bad GatewayOracle backend unreachable or returned invalid data
503Service UnavailableDepeg circuit breaker active — USDC payments suspended

x402 Error Payloads

StatusError FieldDescription
402X-PAYMENT header is requiredNo payment provided. Parse accepts array for payment requirements.
402payment_verification_failedPayment signature invalid, insufficient amount, or facilitator rejected. Check detail field.
402invalid_x_payment_encodingX-PAYMENT header is not valid base64 or not valid JSON.
403payment_address_blockedWallet address hard-blocked. Includes tier and reason fields.
502oracle_backend_errorBackend failed to respond within timeout.
502backend_missing_canonicalBackend responded but without a canonical string.
503depeg_circuit_breakerUSDC deviated beyond threshold. Includes usdc_rate and threshold. Use L402 as fallback.

L402 Error Handling

The L402 proxy (Go) returns standard HTTP errors. The 402 response uses the WWW-Authenticate header rather than a JSON body. If the Lightning invoice has already been paid but the macaroon/preimage is invalid, you'll receive a 401 Unauthorized.

DLC Error Payloads

StatusDetailMeaning
404Announcement not found: {eid}No announcement exists for this event ID.
404Event not found: {eid}No announcement or attestation for this event ID.
425Event announced but not yet attested. Maturity: {time}Retry after the maturity timestamp.
Timeout errors

If you get connection timeouts on cross-rate pairs (BTC/EUR, SOL/EUR, XAU/EUR, BTC/EUR VWAP), increase your HTTP client timeout to at least 15 seconds. These pairs fetch multiple component feeds and can take 6–7 seconds.