demarches-normaliennes/app/javascript/new_design/dossiers
Pierre de La Morinerie ef009f73e2 javascript: report upload FileReader errors to Sentry
We have quite a lot of `Error reading file` errors when uploading files.
These errors are generated by ActiveStorage `file_checksum.js` component
but it eats the actual reason of errors.

(See https://github.com/rails/rails/blob/5-2-stable/activestorage/app/javascript/activestorage/file_checksum.js#L38)

We can't really override the class to generate better errors, as they
are deeply nested in ActiveStorage class hierarchy, and not exported to
external code.

Instead, we hook into the FileReader event handler, to insert a logger
when this error occur. The original event handler will also still be
called as usual.

This is intended to be temporary. The debug code will be removed once
we get a better idea of what is going on.
2020-04-22 11:26:16 +02:00
..
auto-save-controller.js javascript: move the autosave files to a sub-directory 2020-03-23 14:02:29 +01:00
auto-save.js javascript: move the autosave files to a sub-directory 2020-03-23 14:02:29 +01:00
auto-upload-controller.js javascript: add a helpful message on connectivity error 2020-04-16 11:20:45 +02:00
auto-upload.js javascript: fix clicking on the icon of the auto-upload Retry button 2020-04-08 15:48:23 +02:00
auto-uploads-controllers.js javascript: report upload FileReader errors to Sentry 2020-04-22 11:26:16 +02:00