mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

[Bug]: Show "Request was throttled ..." instead of "An unexpected error occured" for the abuse reports addon endpoint #14959

Open ioanarusiczki opened 2 months ago

ioanarusiczki commented 2 months ago

What happened?

From https://github.com/mozilla/addons/issues/14931#issuecomment-2262712333

After hitting the throttle for the abuse report addon endpoint the frontend displays the following error:

frontend error instead of 429

What did you expect to happen?

correct message

It is not reproducible for the other abuse report endpoints: collections, ratings, users.

Is there an existing issue for this?

┆Issue is synchronized with this Jira Task

diox commented 2 months ago

This happens because the error isn't handled in exactly the same way when the request goes through Firefox's built-in navigator.mozAddonManager.sendAbuseReport() API.

To reproduce locally:

If all these steps are followed, you'll see the An unexpected error occurred. If any of the initial steps are skipped, you won't reproduce the problem and will see Request was throttled.