docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

Categorize crates.io API errors

Open byfnoel opened this issue 7 months ago • 4 comments

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

byfnoel avatar Jun 29 '25 22:06 byfnoel

Looks good to me, thanks! I'll let @syphar take a look as well.

GuillaumeGomez avatar Jul 01 '25 08:07 GuillaumeGomez

Thank you for the review @GuillaumeGomez. Let's see if @syphar wants anything changed.

byfnoel avatar Jul 01 '25 19:07 byfnoel

feel free to re-request a review when you're ready again

syphar avatar Jul 27 '25 14:07 syphar

Thank you! Let’s do it, @syphar 👍. Please feel free to point me to a better solution if needed. I appreciate the feedback.

byfnoel avatar Jul 31 '25 02:07 byfnoel