Skip to content

Commit

Permalink
Merge pull request #4511 from LibreSign/fix/display-errors-at-error-page
Browse files Browse the repository at this point in the history
fix: display errors at error page
  • Loading branch information
vitormattos authored Jan 28, 2025
2 parents d6c7c3d + 9f63335 commit dc46549
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 dc46549

Please sign in to comment.