You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #2065 - jtgeibel:prod/make-2-errors-user-facing, r=smarnach
Convert pagination ISE into a Bad Request response
Errors in parsing the pagination query string parameters can be safely returned to the client and do not need to propagate up to the logging middleware.
The following have been observed in production logs:
* error="cannot parse integer from empty string" for `/api/v1/crates?page=&per_page=50&sort=downloads` (empty `page=`)
* error="invalid digit found in string" for `/api/v1/crates?page=1&per_page=100%22%EF%BC%8Cexception"` (very invalid `per_page`)
Additionally, 2 existing pagination errors are converted to use `bad_request()` in place of `cargo_err()`. It is not necessary to send a status=200 response to support old versions of cargo for pagination errors.
Fixes: #1928
r? @smarnach
0 commit comments