You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Map exceptions thrown by downstream handlers to structured JSON error responses (machine-readable code, HTTP status 400-599, message, optional headers) as a PSR-15 middleware.
Declare exception-to-error rules through a fluent, first-match-wins ExceptionMappingTable, matching by exact class, any of a list, or subclass, and resolving to a fixed MappedError or one built from the matched throwable by a closure.
Log errors through an optional PSR-3 logger with configurable verbosity (ErrorHandlingSettings), enriched with the request correlation id via tiny-blocks/http-correlation-id.
Handle unmapped exceptions with a configurable generic 500 fallback or a rethrow to an outer error boundary.