← ClaudeAtlas

scallop-error-handlinglisted

Scallop SDK error handling and exception hierarchy. Use when user says "error", "exception", "error code", "handle errors", "ScallopError", "transaction failed", "debug", "troubleshoot", or asks about Scallop error handling, error codes, debugging failed transactions, or understanding SDK exceptions.
scallop-io/scallop-skills · ★ 1 · AI & Automation · score 65
Install: claude install-skill scallop-io/scallop-skills
# Error Handling Understand and handle errors from the Scallop Python SDK. ## Exception Hierarchy ``` ScallopError (base) ├── ScallopConfigError — Configuration/setup issues ├── ScallopQueryError — Read operation failures │ └── ObligationNotFoundError — Obligation doesn't exist on-chain ├── ScallopTransactionError — Transaction execution failures │ ├── ObligationLockedError — Obligation staked in borrow incentive │ ├── InsufficientBalanceError— Not enough coins │ ├── ZeroAmountError — Amount must be > 0 │ └── LiquidationError — Liquidation failures │ └── NotLiquidatableError— Position is healthy ├── UnsupportedCoinError — Unknown coin name/type ├── OraclePriceError — Price feed failure └── NetworkError — RPC connection failures ``` All exceptions inherit from `ScallopError`, so you can catch broadly or narrowly. ## Import and Basic Usage ```python # These are in the public API (importable from sui_scallop_sdk directly): from sui_scallop_sdk import ( ScallopError, ScallopConfigError, ScallopQueryError, ScallopTransactionError, ObligationNotFoundError, UnsupportedCoinError, ) # These must be imported from the exceptions module directly: from sui_scallop_sdk.exceptions import ( ObligationLockedError, InsufficientBalanceError, ZeroAmountError, OraclePriceError, LiquidationError, NotLiquidatableError, NetworkError, parse_scallop_er