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:
@@ -32,7 +32,7 @@ export const useAuthStore = defineStore('auth', {
|
||||
this.roles = response.roles || (response.role ? [response.role] : [])
|
||||
this.role = response.role || (this.roles.length > 0 ? this.roles[0] : null) // Rückwärtskompatibilität
|
||||
return response
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
this.isLoggedIn = false
|
||||
this.user = null
|
||||
this.roles = []
|
||||
@@ -61,7 +61,7 @@ export const useAuthStore = defineStore('auth', {
|
||||
this.user = null
|
||||
this.roles = []
|
||||
this.role = null
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
console.error('Logout fehlgeschlagen:', error)
|
||||
throw error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user