Categorize crates.io API errors
This PR improves error handling for queries to the crates.io API by categorizing error responses and updating how they are surfaced to users. Instead of logging 4xx or 5xx errors and reporting them to sentry, now we simply show them directly to the user.
Previously, all errors from the crates.io API were logged and reported to Sentry. By surfacing these errors to users, we get to reduce noise in the tracking system and provide more descriptive responses.
Closes #2480
Looks good to me, thanks! I'll let @syphar take a look as well.
Thank you for the review @GuillaumeGomez. Let's see if @syphar wants anything changed.
feel free to re-request a review when you're ready again
Thank you! Let’s do it, @syphar 👍. Please feel free to point me to a better solution if needed. I appreciate the feedback.