Schema Errors
Schema decode producesParseError on invalid input:
catchTag:
Error Details
ParseError contains structured information:
Either for Branching
UsedecodeEither when you want to branch on success/failure:
Service Errors
Services can define their own error types:Error Composition
Errors accumulate in the type signature:Retry with Schedule
Use Effect Schedule for retry behavior:Compared to Base Voltaire
Base Voltaire throws exceptions:Error Types
voltaire-effect defines these error types:| Error | Tag | Source |
|---|---|---|
| ParseError | ParseError | Schema decode failures |
| SignerError | SignerError | Transaction signing failures |
| TransportError | TransportError | Network/HTTP failures |
| ProviderResponseError | ProviderResponseError | Invalid provider response |
| ProviderNotFoundError | ProviderNotFoundError | Missing block/tx/receipt |
| ProviderValidationError | ProviderValidationError | Invalid input to provider method |
| ProviderTimeoutError | ProviderTimeoutError | Provider operation timed out |
| ProviderStreamError | ProviderStreamError | Provider stream failures |
| ProviderReceiptPendingError | ProviderReceiptPendingError | Receipt not available yet |
| ProviderConfirmationsPendingError | ProviderConfirmationsPendingError | Confirmations not met |
| BlockStreamError | BlockStreamError | Block streaming failures |
| CryptoError | CryptoError | Cryptographic operation failures |
GetBalanceError, GetBlockError) that combine TransportError with relevant provider errors.
Either for Partial Failures
UseEither when operations can partially succeed (e.g., multicall batches):
Either vs Effect
| Use Case | Use Either | Use Effect |
|---|---|---|
| Partial failures (some succeed, some fail) | ✅ | ❌ |
| Batch results with mixed outcomes | ✅ | ❌ |
| Operations that can retry/recover | ❌ | ✅ |
| Async operations with dependencies | ❌ | ✅ |
| Schema validation (sync) | ✅ decodeEither | ✅ decode |
Either API Quick Reference
See Also
- Effect Error Management — Official Effect docs
- Effect Either — Either type for error handling
- Multicall Example — Either pattern for batch results
- Provider Service — Provider error handling
- Signer Service — Signer error handling
- Debugging Guide — Inspect errors and trace execution

