Charcoal-SE / userscripts

Collection of userscripts that are used by/are useful to Charcoal.
https://charcoal-se.org/scripts
Apache License 2.0
28 stars 27 forks source link

FIRE: Print better AJAX error messages #187

Open signed-log opened 2 years ago

signed-log commented 2 years ago

When running FIRE and a report from a site you don't have an account in, comes in the chat it fails with a cryptic AJAX error that is commanding you to open the JS console that lists the full error correctly

{
  "error_id": 402,
  "error_message": "The account associated with the access_token does not have a user on the site",
  "error_name": "invalid_access_token"
}

As a non-JS programmer I'd assume it would be easy to catch the error and display a nicer error message for that specific error, but I don't know if it is possible