chore: simplify error handling for login and OpenId Auth
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2023-01-25 18:41:30 +01:00
parent da241d21f3
commit e67088fdb7
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 2 additions and 4 deletions

View File

@ -193,8 +193,7 @@ async function submit() {
return
}
const err = getErrorText(e)
errorMessage.value = typeof err[1] !== 'undefined' ? err[1] : err[0]
errorMessage.value = getErrorText(e)
}
}
</script>

View File

@ -76,8 +76,7 @@ async function authenticateWithCode() {
})
redirectIfSaved()
} catch(e) {
const err = getErrorText(e)
errorMessage.value = typeof err[1] !== 'undefined' ? err[1] : err[0]
errorMessage.value = getErrorText(e)
} finally {
localStorage.removeItem('authenticating')
}