Refactor error handling in various components to ignore modal display failures and improve code clarity
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 51s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 51s
This commit is contained in:
@@ -615,13 +615,17 @@ const saveConfig = async () => {
|
||||
})
|
||||
|
||||
successMessage.value = 'Konfiguration erfolgreich gespeichert!'
|
||||
try { window.showSuccessModal && window.showSuccessModal('Erfolg', 'Konfiguration erfolgreich gespeichert!') } catch (e) {}
|
||||
try { window.showSuccessModal && window.showSuccessModal('Erfolg', 'Konfiguration erfolgreich gespeichert!') } catch (_e) {
|
||||
// Modal nicht verfügbar, ignorieren
|
||||
}
|
||||
setTimeout(() => {
|
||||
successMessage.value = ''
|
||||
}, 3000)
|
||||
} catch (error) {
|
||||
errorMessage.value = error.data?.message || 'Fehler beim Speichern der Konfiguration.'
|
||||
try { window.showErrorModal && window.showErrorModal('Fehler', errorMessage.value) } catch (e) {}
|
||||
try { window.showErrorModal && window.showErrorModal('Fehler', errorMessage.value) } catch (_e) {
|
||||
// Modal nicht verfügbar, ignorieren
|
||||
}
|
||||
} finally {
|
||||
isSaving.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user