-
Notifications
You must be signed in to change notification settings - Fork 213
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
Avoid AxiosError
when requesting bad image links
#3468
Comments
Adding some thoughts about how I am approaching implementation. I think it's a clear win to ignore 404s and not send them to Sentry any more. That's easy to do, we just wrap the call to sentry with @krysal what do you think? I've got the implementation to filter 404s, that was easy enough. What do you think about making the API return 400 for malformed identifiers? That seems like a clear-cut issue to me. |
Actually, I'm looking at another AxiosError in Sentry (private maintainer access required) and these are all "NETWORK_ERR" reason codes. That also seems like something we can pretty safely ignore, but it is different than the one linked in the issue description. Regarding making malformed identifiers 400 instead of 404, it isn't easily possible. We use the lookup value regex to determine when We really just need to treat all 404s coming from the API for single result requests as bad requests, then, without changes to the API, unless we want to really hack on Django's routing and making things more complex. |
@sarayourfriend Yeah, I'm not sure if it's worth making the distinction between the 404 and 400 requests in this case. Under the hood I assume the request to the API is still of the form |
This issue is still occurring: https://openverse.sentry.io/share/issue/20761d85362b468190131dcda0463e9f/ @obulat Do you think it would be best to wait until we migrate to Nuxt 3 to try and handle this? |
Description
There is a recurrent error of Axios trying to request an image with a wrong uuid. It has 112 occurrences since first seen on Nov 20, 2023.
It raises an error with the message:
Request failed with status code 404
.It is unknown to me what or who stumbles upon this URL, but it consumes part of our Sentry quota, so it should be prevented somehow from triggering a notification.
Reproduction
Reproduction steps are unknown.
Sentry details
https://openverse.sentry.io/share/issue/20761d85362b468190131dcda0463e9f/
The text was updated successfully, but these errors were encountered: