OstiumErrorfor client creation, transaction building, signing, submission, and contract interactionOstiumSubgraphErrorfor subgraph reads, builder API reads, parsing, and stream-related data lookups
OstiumError
OstiumError is thrown by the main OstiumClient surface.
Error codes
OstiumSubmissionPendingError
OstiumSubmissionPendingError extends OstiumError with code SUBMISSION_PENDING. It is thrown when an operation reached the network but the SDK could not confirm how it ended — in practice, when waiting for a gasless UserOperation receipt times out after 120 seconds.
This is not a failure: the operation was accepted and can still land, so retrying risks opening the position twice. Reconcile instead of resubmitting:
OstiumError with code CONTRACT_ERROR, naming the contract error — it is never reported as a success.
OstiumSubgraphError
OstiumSubgraphError is thrown by read methods backed by the subgraph or builder API.
Error codes
Recommended handling
- Catch
OstiumErroraround trade setup and write methods. - Catch
OstiumSubgraphErroraround read methods and streams. - Log both
error.codeanderror.message. - If present, inspect
error.causefor the underlying RPC, contract, or fetch error.