/voltaire-effect:voltaire-effect-error-handlingfrom voltaire-effect
This skill should be used when the user asks about "voltaire-effect errors", "typed errors Effect", "catchTag", "ParseError", "ProviderResponseError", "SignerError", "TransportError", "Either partial failures", "error composition", or needs to understand how voltaire-effect handles errors.
Ships in voltaire-effect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
In voltaire-effect, errors are values in the type signature rather than hidden exceptions. Every operation declares which errors it can produce, enabling exhaustive handling via catchTag and compile-time verification that all error paths are covered.
voltaire-effect defines 12 error categories, all accessible via the _tag field:
| Error | Category | When |
|---|---|---|
ParseError | Schema | Invalid input to S.decode |
SignerError | Signing | Transaction/message signing failures |
TransportError | Transport | HTTP/WebSocket connection issues |
ProviderResponseError | Provider | JSON-RPC response errors |
ProviderValidationError | Provider | Invalid response format |
ProviderNotFoundError | Provider | Missing provider service |
ProviderTimeoutError | Provider | Request timed out |
ProviderStreamError | Provider | Subscription failures |
ProviderReceiptPendingError | Provider | Transaction not yet mined |
ProviderConfirmationsPendingError | Provider | Insufficient confirmations |
BlockStreamError | Streaming | Block polling/subscription failures |
CryptoError | Crypto | Cryptographic operation failures |
As operations chain, error types accumulate in the type signature:
const program = Effect.gen(function* () {
const addr = yield* S.decode(Address.Hex)(input)
// Type here: Effect<AddressType, ParseError, never>
const balance = yield* getBalance(addr)
// Type here: Effect<bigint, ParseError | GetBalanceError, ProviderService>
return balance
})
// Final: Effect<bigint, ParseError | GetBalanceError, ProviderService>
Handle specific errors by their _tag discriminator:
program.pipe(
Effect.catchTag('ParseError', (e) =>
Effect.succeed(0n) // Fallback for invalid address
),
Effect.catchTag('TransportError', (e) =>
Effect.fail(new AppError(`Network issue: ${e.message}`))
)
)
Use Match for comprehensive error handling:
import { Match } from 'effect'
const handled = program.pipe(
Effect.catchAll(
Match.value.pipe(
Match.tag('ParseError', () => Effect.succeed(fallback)),
Match.tag('TransportError', () => retryWithBackoff()),
Match.tag('ProviderResponseError', () => switchProvider()),
Match.exhaustive
)
)
)
For batch operations where some items may fail:
// Multicall with allowFailure: true
const results = yield* multicall({
contracts: [call1, call2, call3],
allowFailure: true
})
// results: Either<Result, Error>[]
const successes = results.filter(Either.isRight)
const failures = results.filter(Either.isLeft)
// Pattern match individual results
results.map(Either.match({
onLeft: (error) => console.log('Failed:', error),
onRight: (value) => console.log('Success:', value)
}))
Rule of thumb: Use Either for partial failures in synchronous batches; use Effect for retryable async operations.
Built-in resilience via Effect Schedule:
import { Schedule } from 'effect'
import { withTimeout, withRetrySchedule } from 'voltaire-effect'
// Per-request timeout
getBalance(addr).pipe(withTimeout("5 seconds"))
// Exponential backoff with jitter
getBalance(addr).pipe(
withRetrySchedule(
Schedule.exponential("500 millis").pipe(
Schedule.jittered,
Schedule.compose(Schedule.recurs(3))
)
)
)
Configure retry and timeout at the transport level for all requests:
HttpTransport({
url: 'https://eth.llamarpc.com',
timeout: '30 seconds',
retrySchedule: Schedule.exponential('500 millis').pipe(
Schedule.jittered,
Schedule.compose(Schedule.recurs(5))
)
})
What SKILL.md sets; muted values are Claude Code's defaults
voltaire-effect@cyotee is listed by cyotee/cyotee-claude-plugins — review the source before installing
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin voltaire-effect8 skills in this plugin
/voltaire-effect-architectureVoltaire Effect ArchitectureThis skill should be used when the user asks about "voltaire-effect architecture", "voltaire-effect overview", "how does voltaire-effect work", "what is voltaire-effect", "Effect.ts Ethereum library", "Voltaire Effect layers", "decode use provide pattern", "voltaire-effect vs viem", "voltaire-effect vs ethers", "voltaire-effect getting started", or needs a high-level understanding of how voltaire-effect integrates Voltaire Ethereum primitives with Effect.ts./voltaire-effect-contractsVoltaire Effect Contract InteractionsThis skill should be used when the user asks about "voltaire-effect contract", "Contract factory", "readContract", "writeContract", "simulateContract", "type-safe ABI", "ERC-20 Effect", "contract read write", "contract events", "voltaire-effect multicall", or needs to understand how voltaire-effect interacts with smart contracts./voltaire-effect-cryptoVoltaire Effect Crypto ServicesThis skill should be used when the user asks about "voltaire-effect crypto", "KeccakService", "Secp256k1", "BLS12-381", "AES-GCM", "HDWallet", "BIP-39", "CryptoLive", "CryptoTest", "keccak256 Effect", "ECDSA Effect", "voltaire hashing", "voltaire signing", or needs to understand the cryptographic services in voltaire-effect.Other plugins' skills for the same job