Report handled errors to an external provider - #6
Merged
Conversation
- Add the ErrorReporter seam and the ReportedError context every reporter reads, so a handled error reaches error tracking without the middleware knowing the provider. - Add the SentryReporter adapter, which either boots the SDK from the deployment values or captures onto a hub the application already holds. - Add ReportingFilter, so the consumer decides which handled errors reach the provider and a client error never spends quota. - Add ReportingPriority and PrioritizedError, the four level urgency scale stated once in neutral terms and translated by each adapter. - Add ReportingContext and ReportingTags, the exception side and request side supplements a report carries, which is how a value resolved below the middleware crosses the PSR-7 immutability gap. - Add RouteMiddleware, so a report carries the route the request matched instead of the raw path that names one request rather than one endpoint. - Add withMessage, which settles the message the response answers with before the body is built, so no layer above parses and re-encodes it. - Validate the headers a mapping rule declares, so a malformed field fails while the table is declared rather than on the request that would return it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What this pull request does.
Related issue
Closes #...
Checklist
make reviewpasses.make testspasses.