Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display errors at error page #4511

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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