showAlertForError: fallthrough when response.error() fails

merge-requests/3306/head
Alex Gleason 2024-12-26 11:26:58 -06:00
rodzic c737d7cb5c
commit 3158e0a16a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -57,9 +57,13 @@ async function showAlertForError(networkError: HTTPError): Promise<void> {
return;
}
const data = await response.error();
if (data) {
return error(data.error);
try {
const data = await response.error();
if (data) {
return error(data.error);
}
} catch {
// fallthrough
}
const message = httpErrorMessages.find((httpError) => httpError.code === status)?.description;