Uh oh!
There was an error while loading. Please reload this page.
Avoid sentry batching together of errors by not rethrowing errors with a new error message. - #16
Merged
Conversation
brad-deckerforce-pushed
the
do-not-rethrow
branch
from
September 25, 2023 19:07
c427292 to
df79404Comparebrad-decker
marked this pull request as ready for review
September 25, 2023 19:08
DDDDDanica
approved these changes
Sep 25, 2023
danjm
reviewed
Sep 25, 2023
| return; | ||
| }) | ||
| .catch(error => { | ||
| const outputError = new Error(`[ethjs-query] while formatting outputs from RPC '${JSON.stringify(error, null, this.options.jsonSpace)}'`); |
There was a problem hiding this comment.
@brad-decker any idea why this catching and rethrowing was done this way in the first place?
6 tasks
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 freeto 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.
This pull request removes special casing for formatting errors and stops catching all errors that occur during JSON RPC processing and rethrowing as formatting errors (which is incorrect). Instead we allow the original error to be thrown so that sentry will properly show the logs and so that we can investigate and fix any issues that emerge. The original code had a catch statement that was entirely too broad, and assumed all errors thrown were formatting errors. Even still the try catch around the formatting of output seems to be superfluous as we'd ideally catch individual formatting errors where they occur so that we could properly group categories of bugs and find solutions to those bugs instead of getting a single error report with unrelated errors grouped together creating too much noise/signal.
This PR includes automatic changes to package-lock that is part of #15 that should be reviewed before this merges