Error Handling
The main error types in this package are:
NetworkErrorfor HTTP or WebSocket transport failuresValidationErrorfor schema mismatchesApiErrorfor indexer or node-level API failuresLogicErrorfor invalid local usage or SDK-side assumptionsBadRequestfor invalid request shapes caught by the client or API
Recommended Pattern
from typed_core.exceptions import ApiError, BadRequest, LogicError, NetworkError, ValidationError
try:
...
except ValidationError:
...
except BadRequest:
...
except LogicError:
...
except ApiError:
...
except NetworkError:
...
Notes
- indexer HTTP failures are wrapped as
ApiError(status, result) - node gRPC failures are also normalized into
ApiError batch_cancel_ordersmay raiseBadRequestfor unsupported order shapes, such as non-short-term batch cancels