8dce7d59ed
Before, when a 401 was received by a ujs-enabled link (like `link_to …, method: :delete, data: { remote: true }`, rails-ujs tried to insert the response text as a Javascript script. As the script was something like `Please sign-in`, which is not valid Javascript, the browser would throw an "Unexpected token" error. The typical use-case is: 1. The user open a form in a tab, 2. The user disconnects in another tab, 3. In the first tab, the user clicks on a remote "Delete" link_to In that case the browser raised an error in the console (and in Sentry), but the user would see nothing. With this commit, all 401 ujs errors are turned into redirects to the sign-in page. Fix https://sentry.io/organizations/demarches-simplifiees/issues/2522512693/activity/ |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
dashboards | ||
fields | ||
graphql | ||
helpers | ||
javascript | ||
jobs | ||
lib | ||
mailers | ||
models | ||
policies | ||
schemas | ||
serializers | ||
services | ||
validators | ||
views |