error.code) so callers can branch without string matching.
Class hierarchy
- JavaScript
- Python
PeaqosError directly. Each function area adds its own family alongside them, also extending PeaqosError: MonetizationError, ProvisioningError, StreamError, and OrchestrationError. So catch (err instanceof PeaqosError) covers every SDK error; catching RuntimeError alone will miss ValueCapExceeded and RateLimitExceeded.Faucet error codes
All 20 codes the can return fromPOST /faucet/fund, POST /2fa/setup, and POST /2fa/confirm. Each endpoint returns a subset. For example, INVALID_OWNER_ADDRESS and QR_GENERATION_FAILED only come from /2fa/setup. Codes surface as RuntimeError.code (JS) or ApiError.code (Python).
2FA errors
2FA errors
Idempotency errors
Idempotency errors
Rate limit & cap errors
Rate limit & cap errors
Validation errors
Validation errors
Chain & server errors
Chain & server errors
QR errors
QR errors
On-chain revert names
names the SDK translates to a friendly message and surfaces asRuntimeError.code (JS) or RpcError.code (Python). The contracts define more custom errors than this table; anything not listed surfaces as code: "TX_REVERTED" (Python) or code: "<RawErrorName>" with a generic Transaction reverted: … message (JS, when viem decodes the selector).
MCR API error codes
Returned byqueryMcr / query_mcr, queryMachine / query_machine, and queryOperatorMachines / query_operator_machines. Surfaced as RuntimeError.code (JS) or ApiError.code (Python).
OWS signing error codes
Raised when routes through an (PeaqosClient.fromWallet / from_wallet with owsSigning=true). The SDK normalises the upstream OWS error code into a typed SDK exception — only INVALID_INPUT becomes ValidationError; the other four become PeaqosError (or RuntimeError in JS) with the original OWS error preserved as .cause.
Constants exported from both SDKs as
OWS_ERROR_WALLET_NOT_FOUND, OWS_ERROR_INVALID_PASSPHRASE, OWS_ERROR_INVALID_INPUT, OWS_ERROR_POLICY_DENIED, OWS_ERROR_CHAIN_NOT_SUPPORTED. JS additionally exports the OwsSigningErrorCode union type.
SDK transaction sentinels
Raised by the SDK’s transaction helper around any contract call. Surfaced asRuntimeError.code (JS) or RpcError.code (Python).
Faucet / HTTP envelope sentinels
Raised by the SDK when a faucet or MCR response is reachable but unparseable. Surfaced asApiError.code (Python). The JS SDK collapses these into the generic RuntimeError envelope path.
Client-side error codes
Raised by the SDK itself (not by a chain revert). Surfaced asRuntimeError.code (JS) or ValidationError/RpcError attributes (Python).
Error handling patterns
- JavaScript
- Python

