Enhance security and error handling in various components by refining error catch blocks to ignore specific errors, improving code clarity and consistency across the application.
This commit is contained in:
@@ -566,8 +566,6 @@
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { Settings, Calendar, Users as UsersIcon, CreditCard, Plus, Trash2, X, Loader2, AlertCircle, Check } from 'lucide-vue-next'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const isLoading = ref(true)
|
||||
const isSaving = ref(false)
|
||||
const errorMessage = ref('')
|
||||
@@ -596,7 +594,7 @@ const loadConfig = async () => {
|
||||
try {
|
||||
const response = await $fetch('/api/config')
|
||||
config.value = response
|
||||
} catch (error) {
|
||||
} catch {
|
||||
errorMessage.value = 'Fehler beim Laden der Konfiguration.'
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
@@ -615,7 +613,7 @@ 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 {
|
||||
// Modal nicht verfügbar, ignorieren
|
||||
}
|
||||
setTimeout(() => {
|
||||
@@ -623,7 +621,7 @@ const saveConfig = async () => {
|
||||
}, 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 {
|
||||
// Modal nicht verfügbar, ignorieren
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user