Error Codes
HTTP status codes and error payloads across all oracle endpoints.
Standard HTTP Codes
| Status | Meaning | Action |
|---|---|---|
200 | Success — signed attestation returned | Verify signature, extract price from canonical |
402 | Payment Required | Parse payment instructions and pay (L402 invoice or x402 USDC) |
403 | Forbidden — address blocked | Payment address has been hard-blocked due to repeated failures |
404 | Not Found | Invalid endpoint path or DLC event ID not found |
425 | Too Early (DLC only) | Event announced but not yet attested — retry after maturity |
502 | Bad Gateway | Oracle backend unreachable or returned invalid data |
503 | Service Unavailable | Depeg circuit breaker active — USDC payments suspended |
x402 Error Payloads
| Status | Error Field | Description |
|---|---|---|
402 | X-PAYMENT header is required | No payment provided. Parse accepts array for payment requirements. |
402 | payment_verification_failed | Payment signature invalid, insufficient amount, or facilitator rejected. Check detail field. |
402 | invalid_x_payment_encoding | X-PAYMENT header is not valid base64 or not valid JSON. |
403 | payment_address_blocked | Wallet address hard-blocked. Includes tier and reason fields. |
502 | oracle_backend_error | Backend failed to respond within timeout. |
502 | backend_missing_canonical | Backend responded but without a canonical string. |
503 | depeg_circuit_breaker | USDC deviated beyond threshold. Includes usdc_rate and threshold. Use L402 as fallback. |
L402 Error Handling
L402 is served under https://api.myceliasignal.com/l402/. The proxy (Go) puts the payment challenge in the WWW-Authenticate header: L402 macaroon="…", invoice="…". The invoice and the macaroon both expire after 300 seconds.
| Status | Body | Meaning |
|---|---|---|
402 | Payment Required | No Authorization header. Pay the invoice in WWW-Authenticate and retry with Authorization: L402 <macaroon>:<preimage>. |
402 | {"error":"invalid token or unpaid invoice", …} | The token was rejected: wrong preimage, invoice not paid, expired, or issued for a different path. A fresh challenge is in WWW-Authenticate. |
404 | {"error":"not found"} | The path is not available on L402. See /.well-known/l402 for the endpoints that are. |
500 | {"error":"invoice creation failed"} | The Lightning node could not create an invoice. Retry later. |
500 | {"error":"macaroon creation failed"} | Internal error minting the macaroon. Retry later. |
A rejected token never returns 401. The DLC oracle (/l402/dlc/…) issues its own challenges and errors; see below.
DLC Error Payloads
| Status | Detail | Meaning |
|---|---|---|
404 | Announcement not found: {eid} | No announcement exists for this event ID. |
404 | Event not found: {eid} | No announcement or attestation for this event ID. |
425 | Event 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.