Commit graph

6 commits

Author SHA1 Message Date
Pierre de La Morinerie
bbc0aa5465 javascript: remove debug code for FileReader errors 2020-05-14 13:29:54 +02:00
Pierre de La Morinerie
86357b65f0 javascript: ignore most common upload errors 2020-05-14 13:29:54 +02:00
Paul Chavard
43a1ead1cb fix new prettier defaults 2020-05-12 18:18:37 +02:00
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
Pierre de La Morinerie
b2231e98d5 javascript: don't report connectivity issues to Sentry 2020-04-16 11:20:45 +02:00
Pierre de La Morinerie
6417c0d2c0 dossiers: allow auto upload of attachments 2020-03-31 13:09:44 +02:00