-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add middleware to log server errors #2196
Add middleware to log server errors #2196
Conversation
Code Coverage Diff
|
/hold putting this on hold to test edge cases, but it is ready for review |
Signed-off-by: Connor Catlett <[email protected]>
84977af
to
1500fba
Compare
/remove-hold |
Broke DNS and can confirm the relevant errors aren't swallowed:
Thank you! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: torredil The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Is this a bug fix or adding new feature?
Both? Kinda?
What is this PR about? / Why do we need it?
Fixes #2154
When the SDK hits a retryable error (for example, most server errors or network issues), it does not log the error in the log, preventing users and maintainers from discovering the nature of the issue. There is a built in logger for retries, but it would be sub-optimal to use that because it would flood the logs any time
RequestLimitExceeded
errors occurred. Thus, this PR instead introduces a simple logging middleware that allows us to customize the verbosity of the error message based on whether the error is a RLE/throttle error.What testing is done?
Manually tested (We don't have a way to test log messages atm, and maybe shouldn't even be doing so)