Raw error response from the O2 API.

Errors come in two formats:

  • Pre-flight validation errors: code + message (no transaction submitted)
  • On-chain reverts: reason + receipts (transaction submitted but reverted)
interface O2ErrorResponse {
    code?: number;
    message: string;
    reason?: string;
    receipts?: unknown[];
}

Properties

code?: number

Error code (present for pre-flight validation errors).

message: string

Error message.

reason?: string

On-chain revert reason (e.g., "NotEnoughBalance").

receipts?: unknown[]

Transaction receipts from on-chain reverts.