Skip to content

Commit

Permalink
fix: display errors at error page
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Jan 28, 2025
1 parent 057e1cd commit 6771e41
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/views/DefaultPageError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
{{ t('libresign', 'Page not found') }}
</h2>
<p>{{ paragrath }}</p>
<NcNoteCard v-if="error" type="error" heading="Error">
<NcNoteCard v-for="(error, index) in errors"
:key="index"
type="error"
heading="Error">
{{ error }}
</NcNoteCard>
</div>
Expand All @@ -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 []
},
},

}
</script>
Expand Down

0 comments on commit 6771e41

Please sign in to comment.