Backport https://github.com/go-gitea/gitea/pull/29639.
When logging out of Gitea, a error toast can be seen for a split second.
I don't know why or how it happens but I found it it's an `AbortError`
(related to
[AbortController#abort](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)),
so let's hide it.
showErrorToast(`server error: ${resp.status}`);
}
} catch (e) {
- console.error('error when doRequest', e);
actionElem.classList.remove('is-loading', 'small-loading-icon');
- showErrorToast(i18n.network_error);
+ if (e.name !== 'AbortError') {
+ console.error('error when doRequest', e);
+ showErrorToast(i18n.network_error);
+ }
}
}