mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 05:52:10 +00:00
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. (cherry picked from commit 346b66230519955fc831e75a9cc6175621d63b02)
This commit is contained in:
parent
ac05e205ba
commit
4f9b761a06
|
@ -101,10 +101,12 @@ async function fetchActionDoRequest(actionElem, url, opt) {
|
||||||
showErrorToast(`server error: ${resp.status}`);
|
showErrorToast(`server error: ${resp.status}`);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('error when doRequest', e);
|
|
||||||
actionElem.classList.remove('is-loading', 'small-loading-icon');
|
actionElem.classList.remove('is-loading', 'small-loading-icon');
|
||||||
|
if (e.name !== 'AbortError') {
|
||||||
|
console.error('error when doRequest', e);
|
||||||
showErrorToast(i18n.network_error);
|
showErrorToast(i18n.network_error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function formFetchAction(e) {
|
async function formFetchAction(e) {
|
||||||
|
|
Loading…
Reference in a new issue