Skip to main content
When something goes wrong, the API returns a JSON envelope:
The SDK maps non-2xx HTTP responses into LuminaError with .status, .code, .message. Use the code field for branching; the message is for logs / UI surfacing.

HTTP envelope

Application-level codes

The code field on the JSON envelope is one of:

On-chain reverts (surfaced verbatim from the contracts)

These come back inside the message field when a transaction reverts. The SDK preserves the raw revert reason; below is the catalogue of strings you may see and what they mean.

CoverRouterV2

BaseFlashShield / FlashBTC/ETHShield

BondVault

When a redemption would exceed the 1.08% per-epoch throttle, the bond is BURNED IMMEDIATELY and added to the FIFO queue for the next epoch (no revert). The user gets a BondQueued event back; LUMINA pays out when processQueue() is called against the target epoch. See BondVault throttle for the full queue lifecycle.

LuminaBondMarketplace

LuminaTokenV2

Retry strategy

For transient errors (HTTP 5xx, ORACLE_STALE, SEQUENCER_DOWN, chain_not_found):
  • Initial retry after 1s
  • Exponential backoff: 1s, 2s, 4s, 8s, 16s, 32s
  • Max 6 retries (~63s total wall clock)
  • Honour Retry-After headers when present
For permanent errors (HTTP 4xx except 429, on-chain reverts other than ORACLE_STALE / SEQUENCER_DOWN):
  • Do not retry
  • Surface the code + message to your user with a clear next step

Webhook delivery

When the API can’t deliver a webhook (3xx / 4xx / 5xx / timeout):
  • Retry schedule: 1m, 5m, 30m, 2h, 12h, 24h (6 attempts)
  • After the 6 attempts, the webhook is marked undeliverable
  • Re-enable via POST /api/v1/webhooks/{id}/retry
  • Each delivery carries an HMAC signature in X-Lumina-Signature — reject any payload that fails verification