-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[beta] Backport #6771 #6808
[beta] Backport #6771 #6808
Conversation
Currently if Cargo ever gets a non-200 response, it will either not show the error at all (if it was a 403 or 404), or spit out the entire response body. Historically crates.io has served a 200 for most errors to work around this, but we've stopped doing this as it causes problems for other clients. Additionally, we're starting to server more errors that have semantic meaning (429 for rate limiting, 503 when we're in read only mode). If the request specifies "Accept: application/json", we should ideally return the errors formatted nicely. This isn't always true, but it's what we'd like to do going forward. While the output that Cargo puts out at least contains the actual message, it's buried under a ton of useless info. This changes the behavior so that if the response was valid JSON in the format that Cargo expects, it just shows that (along with a description of the response status), and only falls back to spitting out everything if it can't parse the response body. I'd love to add some more tests for this, but I've had trouble finding anywhere in the test suite that exercises these paths.
(rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors: r+ |
📌 Commit 4746289 has been approved by |
⌛ Testing commit 4746289 with merge d3c0198a3e3386d96c19d7f887eff5b2e02c0c66... |
I think this will fail for multiple reasons. @sgrif can you cherry-pick some other PRs to get the 1.34 branch working? I think it will need #6807. It looks like there is another unused item in Also, it looks like the minimal versions CI entries are failing. Just delete the entire entry from .travis.yml and appveyor.yml. Let me know if you want me to do it or have any questions. |
Cherry picked #6807 and deleted the minimal version entries from travis and appveyor |
Fixed the errors from |
Thanks! Sorry, the beta branches always seem to have problems since they are so rarely built. @bors r=alexcrichton |
📌 Commit 067c199 has been approved by |
No worries. This is mostly on me for letting this sit for so long. |
☀️ Test successful - checks-travis, status-appveyor |
No description provided.