-
Notifications
You must be signed in to change notification settings - Fork 463
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
fix(pageserver): receive body error now 500 #9052
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
4968 tests run: 4804 passed, 0 failed, 164 skipped (full report)Flaky tests (4)Postgres 17
Postgres 16
Postgres 15
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
3b39f86 at 2024-09-19T20:07:17.798Z :recycle: |
jcsp
reviewed
Sep 19, 2024
jcsp
reviewed
Sep 19, 2024
skyzh
changed the title
impr(pageserver): receive body error now 500
fix(pageserver): receive body error now 500
Sep 19, 2024
Signed-off-by: Alex Chi Z <chi@neon.tech>
added a commit to only return 500 for decoding errors; for other reqwest errors, also log the error source |
jcsp
approved these changes
Sep 20, 2024
davidgomes
pushed a commit
that referenced
this pull request
Sep 21, 2024
close #8903 In #8903 we observed JSON decoding error to have the following error message in the log: ``` Error processing HTTP request: Resource temporarily unavailable: 3956 (pageserver-6.ap-southeast-1.aws.neon.tech) error receiving body: error decoding response body ``` This is hard to understand. In this patch, we make the error message more reasonable. ## Summary of changes * receive body error is now an internal server error, passthrough the `reqwest::Error` (only decoding error) as `anyhow::Error`. * instead of formatting the error using `to_string`, we use the alternative `anyhow::Error` formatting, so that it prints out the cause of the error (i.e., what exactly cannot serde decode). I would expect seeing something like `error receiving body: error decoding response body: XXX field not found` after this patch, though I didn't set up a testing environment to observe the exact behavior. --------- Signed-off-by: Alex Chi Z <chi@neon.tech>
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.
Problem
close #8903
In #8903 we observed JSON decoding error to have the following error message in the log:
This is hard to understand. In this patch, we make the error message more reasonable.
Summary of changes
reqwest::Error
(only decoding error) asanyhow::Error
.to_string
, we use the alternativeanyhow::Error
formatting, so that it prints out the cause of the error (i.e., what exactly cannot serde decode).I would expect seeing something like
error receiving body: error decoding response body: XXX field not found
after this patch, though I didn't set up a testing environment to observe the exact behavior.Checklist before requesting a review
Checklist before merging