Skip to content

Commit

Permalink
Merge pull request #4512 from LibreSign/backport/4511/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: display errors at error page
  • Loading branch information
vitormattos authored Jan 28, 2025
2 parents d1ec7cd + 3fbcf2e commit dc50351
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 @@ -30,7 +30,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 @@ -52,9 +55,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 dc50351

Please sign in to comment.