diff --git a/backend/lib/security/index.js b/backend/lib/security/index.js index 6671e07551..251916a85f 100644 --- a/backend/lib/security/index.js +++ b/backend/lib/security/index.js @@ -355,7 +355,16 @@ async function getTokenSet (cookies) { if (!encryptedValues) { throw createError(401, 'No bearer token found in request', { code: 'ERR_JWE_NOT_FOUND' }) } - const values = await decrypt(encryptedValues) + let values = '' + try { + values = await decrypt(encryptedValues) + } catch (err) { + const { + message, + code = 'ERR_JWE_DECRYPTION_FAILED' + } = err + throw createError(401, message, { code }) + } if (!values) { throw createError(401, 'The decrypted bearer token must not be empty', { code: 'ERR_JWE_DECRYPTION_FAILED' }) } diff --git a/frontend/src/layouts/GDefault.vue b/frontend/src/layouts/GDefault.vue index 764fe43784..03eb497635 100644 --- a/frontend/src/layouts/GDefault.vue +++ b/frontend/src/layouts/GDefault.vue @@ -11,8 +11,8 @@ SPDX-License-Identifier: Apache-2.0 :code="routerErrorCode" :text="routerErrorText" :message="routerErrorMessage" - button-text="Reload this page" - @click="reload" + :button-text="buttonText" + @click="onClick" />