javascript: ignore errors of attachments pooler

Pooling for attachment status is a background operation. Errors should
not be reported to the user, who didn't even ask for this operation to
take place.

This is why we ignore all errors, whether Javascript exceptions or
network errors.
This commit is contained in:
Pierre de La Morinerie 2020-04-06 16:42:54 +02:00
parent 7d712521cf
commit 38c0cdc360

View file

@ -67,7 +67,9 @@ class RemotePoller {
let urls = this.urls;
this.reset();
for (let url of urls) {
ajax({ url, type: 'get' });
// Start the request. The JS payload in the response will update the page.
// (Errors are ignored, because background tasks shouldn't report errors to the user.)
ajax({ url, type: 'get' }).catch(() => {});
}
}