From 6771e4106c0337940cbed0cfe617387b699d4158 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Tue, 28 Jan 2025 14:28:22 -0300 Subject: [PATCH] fix: display errors at error page Some errors wasn't displayed, with this change is possible to show different types of error structure at error page Signed-off-by: Vitor Mattos --- src/views/DefaultPageError.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/DefaultPageError.vue b/src/views/DefaultPageError.vue index 1ab5ede7e2..02416df38c 100644 --- a/src/views/DefaultPageError.vue +++ b/src/views/DefaultPageError.vue @@ -12,7 +12,10 @@ {{ t('libresign', 'Page not found') }}

{{ paragrath }}

- + {{ error }} @@ -34,9 +37,21 @@ export default { data() { return { paragrath: t('libresign', 'Sorry but the page you are looking for does not exist, has been removed, moved or is temporarily unavailable.'), - error: loadState('libresign', 'error', {})?.message, } }, + computed: { + errors() { + const errors = loadState('libresign', 'errors', []) + if (errors.length) { + return errors + } + const errorMessage = loadState('libresign', 'error', {})?.message + if (errorMessage) { + return [errorMessage] + } + return [] + }, + }, }