feat(shared): SanitizeExceptions decorator#18164
Merged
david1alvarez merged 1 commit intomainfrom Jan 10, 2025
Merged
Conversation
78189bd to
b78e802
Compare
32cb293 to
b6653fc
Compare
StaberindeZA
reviewed
Jan 6, 2025
Contributor
StaberindeZA
left a comment
There was a problem hiding this comment.
This looks good so far. Just left some inline comments in a few spots.
nit. could you fix up the git commit body to match fxa contributors guidelines?
7c34fca to
87a366c
Compare
StaberindeZA
reviewed
Jan 9, 2025
Contributor
StaberindeZA
left a comment
There was a problem hiding this comment.
Mostly just a few questions left. But otherwise this looks good.
b373c3c to
bc2ea71
Compare
bc2ea71 to
749a2b9
Compare
Because: * In instances where the client can call methods "directly" (such as via NextJS Server Actions), we need to ensure that the only data that gets passed through to the user is what is intended. Error propagation is a common way for unexpected data to leak to the user. This commit: * Adds a SanitizeExceptions decorator to libs/shared/error that wraps a class, and captures any errors thrown by its methods. Unless specified, errors are replaced with a generic error message. Original error data is sent to Sentry, along with a data tag to indicate whether it was sanitized or passed through. Closes # FXA-10626
749a2b9 to
db54463
Compare
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.
Because
This pull request
Issue that this pull request solves
Closes: FXA-10626
Checklist
Put an
xin the boxes that apply