Handle non-200 response codes from registry nicely #3995
Labels
A-interacts-with-crates.io
Area: interaction with registries
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-owner
Command-publish
Command-search
Currently crates.io always returns a 200 status code unless cargo's token is invalid/nonexistent (or there is an internal error), any errors for cargo are then returned in a json object (e.g. validation of the Cargo.toml fields during a publish).
I attempted to change crates.io to return a 400 status code, but cargo does not handle these nicely
I have opened a ticket at rust-lang/crates.io#712 as well, it's probably worth discussing whether this is a change that is wanted at all there, before discussing any kind of implementation details here.
The text was updated successfully, but these errors were encountered: