Error Handling
Type-safe error handling via Result / Option / Either patterns instead of throwing exceptions across module boundaries. Guard-clause DSLs for method preconditions. Resilient JSON / config parsing with fallback defaults. Backoff + jitter helpers for retry primitives. The defensive-programming layer that keeps a single bad input from cascading into a 500.
Projects
Packages (51)
- @philiprehberger/dart-result-typedart
Rust-style Result type for type-safe error handling with pattern matching.
- @philiprehberger/dart-retrydart
Configurable retry with exponential backoff, jitter, and circuit breaker
- @philiprehberger/dotnet-circuit-breakerdotnet
Standalone circuit breaker with sliding window failure rate, fallback support, half-open probing, and event callbacks.
- @philiprehberger/dotnet-fluent-guarddotnet
Fluent parameter validation and guard clauses for .NET.
- @philiprehberger/dotnet-option-typedotnet
Option/Maybe monad for explicit null handling with Map, Bind, Match, and LINQ support.
- @philiprehberger/dotnet-resultdotnet
Lightweight Result type for .NET — model success and failure without exceptions using pattern matching.
- @philiprehberger/dotnet-retry-kitdotnet
Configurable retry logic and circuit breaker for .NET — exponential backoff, jitter, and built-in presets.
- @philiprehberger/dotnet-safe-jsondotnet
Resilient JSON parsing with fallback defaults and path-based value extraction that never throws.
- @philiprehberger/go-circuitbreakergo
Generic circuit breaker for Go. Protect external calls with automatic failure detection and recovery
- @philiprehberger/go-panicguardgo
Panic recovery utilities for Go — safe goroutines, panic-to-error conversion, and HTTP handler protection
- @philiprehberger/go-resultgo
Generic Result type for Go — `Ok[T]` / `Err[T]` with mapping and chaining
- @philiprehberger/go-retry-kitgo
Retry with exponential backoff, circuit breaker, and context cancellation for Go
- @philiprehberger/go-safechango
Safe channel utilities for Go with panic-free send/receive, context-aware communication, and combinators
- @philiprehberger/kt-circuit-breakerkotlin
Coroutine-aware circuit breaker for resilient Kotlin services.
- @philiprehberger/kt-guard-clausekotlin
Fluent guard clause validation for Kotlin with descriptive error messages.
- @philiprehberger/kt-resultkotlin
A lightweight, typed Result monad for Kotlin with railway-oriented error handling.
- @philiprehberger/kt-retry-kitkotlin
Coroutine-native retry with configurable backoff strategies for Kotlin.
- @philiprehberger/kt-safe-jsonkotlin
Non-throwing JSON parsing with typed errors and path-based navigation.
- @philiprehberger/http-retry-clientphp
HTTP client wrapper with automatic retries, exponential backoff, and jitter
- @philiprehberger/laravel-operation-resultphp
Typed Result pattern for Laravel service-layer operations with named factory methods and specialized result types
- @philiprehberger/php-circuit-breakerphp
Circuit breaker pattern with configurable thresholds and multiple storage backends
- @philiprehberger/php-retryphp
Composable retry utility with exponential backoff, jitter, and exception filtering
- @philiprehberger/php-safe-jsonphp
Safe JSON parsing with exceptions, schema validation, and typed getters
- @philiprehberger/safe-file-writerphp
Atomic file writes with temp-file swap and file locking
- @philiprehberger/py-circuit-breakerpython
Circuit breaker pattern for fault-tolerant service calls.
- @philiprehberger/py-deprecatepython
Decorator and utilities for deprecating functions, parameters, and classes with zero boilerplate
- @philiprehberger/py-func-timeoutpython
Add a timeout to any function call, sync or async.
- @philiprehberger/py-resultpython
Rust-inspired Result type for Python with pattern matching and type-safe error handling
- @philiprehberger/py-retry-kitpython
Async retry with exponential backoff, circuit breaker, and cancellation for Python
- @philiprehberger/py-safe-jsonpython
JSON encoder that handles datetime, Decimal, UUID, dataclasses, and sets without crashing.
- @philiprehberger/py-type-guardpython
Runtime type checking decorators for function arguments
- @philiprehberger/rb-circuitruby
Minimal circuit breaker with configurable thresholds, error filtering, and exponential backoff
- @philiprehberger/rb-guard-clauseruby
Expressive guard clause DSL for method precondition validation
- @philiprehberger/rb-mayberuby
Optional/Maybe monad with safe chaining and pattern matching
- @philiprehberger/rb-resultruby
Result type with Ok/Err, map, flat_map, and pattern matching
- @philiprehberger/rb-retry-kitruby
Retry with exponential backoff, jitter, and circuit breaker
- @philiprehberger/rb-timeout-kitruby
Safe timeout patterns without Thread.raise
- @philiprehberger/rb-tryruby
Concise error handling with fallbacks, chained recovery, and timeout wrapping
- @philiprehberger/rs-guard-clauserust
Early-return guard clause macros for cleaner control flow
- @philiprehberger/rs-result-extrust
Extension traits for Result and Option with tap, map, and error accumulation
- @philiprehberger/rs-retry-kitrust
Async retry with exponential backoff and circuit breaker for Rust
- @philiprehberger/result-chaintypescript
Chainable Result monad for error handling without exceptions
- @philiprehberger/retry-kittypescript
Async retry with exponential backoff, circuit breaker, and abort signals
- @philiprehberger/safe-jsontypescript
Safe JSON parsing and serialization with circular detection and depth limiting
- @philiprehberger/safe-parsetypescript
Safe parsing for primitives — numbers, booleans, dates, JSON from unknown strings
- @philiprehberger/safe-timeouttypescript
Reliable timeout wrapper for async operations with AbortController support
- @philiprehberger/ts-circuit-breakertypescript
Circuit breaker pattern for fault-tolerant async service calls
- @philiprehberger/ts-guardtypescript
Runtime type guard utilities with TypeScript narrowing
- @philiprehberger/ts-resulttypescript
Rust-inspired Result type for type-safe error handling without try/catch
- @philiprehberger/ts-retry-queuetypescript
Retry queue with exponential backoff for resilient async processing
- @philiprehberger/ts-safe-regextypescript
Validate and sanitize regular expressions to prevent ReDoS attacks