Fixed error wuth login is too long when a session is expired (#453)

pull/3759/head
Yamel Senih 2020-04-19 21:24:10 -04:00 committed by GitHub
parent fbe00c4478
commit ae787ba798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,7 @@ const actions = {
if (isEmptyValue(sessionUuid)) {
sessionUuid = getToken()
}
return new Promise(resolve => {
return new Promise((resolve, reject) => {
getSessionInfo(sessionUuid)
.then(responseGetInfo => {
const { role } = responseGetInfo
@ -118,10 +118,12 @@ const actions = {
dispatch('getUserInfoFromSession', sessionUuid)
.catch(error => {
console.warn(`Error ${error.code} getting user info value: ${error.message}.`)
reject(error)
})
})
.catch(error => {
console.warn(`Error ${error.code} getting context session: ${error.message}.`)
reject(error)
})
})
},