Skip to main content
The SDK exposes two error classes:
  • OstiumError for client creation, transaction building, signing, submission, and contract interaction
  • OstiumSubgraphError for subgraph reads, builder API reads, parsing, and stream-related data lookups

OstiumError

OstiumError is thrown by the main OstiumClient surface.

Error codes

OstiumSubgraphError

OstiumSubgraphError is thrown by read methods backed by the subgraph or builder API.

Error codes

  • Catch OstiumError around trade setup and write methods.
  • Catch OstiumSubgraphError around read methods and streams.
  • Log both error.code and error.message.
  • If present, inspect error.cause for the underlying RPC, contract, or fetch error.