mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
catch error Client certificate revoked and pass error.session-expired. Graph QL error: always passed from backend
This commit is contained in:
parent
1605cea902
commit
fb48e7c9d2
@ -48,7 +48,7 @@
|
||||
"error": "Fehler",
|
||||
"no-account": "Leider konnten wir keinen Account finden mit diesen Daten!",
|
||||
"no-email-verify": "Die Email wurde noch nicht bestätigt, bitte überprüfe deine Emails und klicke auf den Aktivierungslink!",
|
||||
"session-expired": "Sitzung abgelaufen!"
|
||||
"session-expired": "Die Sitzung wurde aus Sicherheitsgründen beendet."
|
||||
},
|
||||
"form": {
|
||||
"amount": "Betrag",
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
"error": "Error",
|
||||
"no-account": "Unfortunately we could not find an account to the given data!",
|
||||
"no-email-verify": "Your email is not activated yet, please check your emails and click the activation link!",
|
||||
"session-expired": "The session expired"
|
||||
"session-expired": "The session was closed for security reasons."
|
||||
},
|
||||
"form": {
|
||||
"amount": "Amount",
|
||||
|
||||
@ -24,7 +24,7 @@ const authLink = new ApolloLink((operation, forward) => {
|
||||
})
|
||||
return forward(operation).map((response) => {
|
||||
if (response.errors && response.errors[0].message === '403.13 - Client certificate revoked') {
|
||||
response.errors[0].message = i18n.t('error.session-expired')
|
||||
// response.errors[0].message = i18n.t('error.session-expired')
|
||||
store.dispatch('logout', null)
|
||||
if (router.currentRoute.path !== '/login') router.push('/login')
|
||||
return response
|
||||
|
||||
@ -133,7 +133,9 @@ export default {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.pending = true
|
||||
this.$toasted.error(error.message)
|
||||
if (error.message === 'GraphQL error: 403.13 - Client certificate revoked') {
|
||||
this.$toasted.error(this.$t('error.session-expired'))
|
||||
}
|
||||
// what to do when loading balance fails?
|
||||
})
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user