js: don't report autosave failures that are timeouts
This prevents spamming Sentry with "[Autosave] Error: 0" messages.
This commit is contained in:
parent
8dce7d59ed
commit
ad8dcc7f7d
1 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,11 @@ addEventListener('autosave:error', (event) => {
|
|||
|
||||
enable(document.querySelector('button.autosave-retry'));
|
||||
setState('failed');
|
||||
logError(event.detail);
|
||||
|
||||
const shouldLogError = !error.xhr || error.xhr.status != 0; // ignore timeout errors
|
||||
if (shouldLogError) {
|
||||
logError(error);
|
||||
}
|
||||
});
|
||||
|
||||
function setState(state) {
|
||||
|
|
Loading…
Reference in a new issue