Skip to content

Commit 1d9da32

Browse files
authored
Merge pull request #10742 from nextcloud/fix/thread-error-message
fix: thread error message handling
2 parents 8d72282 + 7593d60 commit 1d9da32

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Thread.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<AppContentDetails id="mail-message">
77
<!-- Show outer loading screen only if we have no data about the thread -->
88
<Loading v-if="loading && thread.length === 0" :hint="t('mail', 'Loading thread')" />
9-
<Error v-else-if="error"
10-
:error="error && error.message ? error.message : t('mail', 'Not found')"
9+
<Error v-else-if="errorTitle || errorMessage"
10+
:error="errorTitle ? errorTitle : t('mail', 'Not found')"
1111
:message="errorMessage" />
1212
<template v-else>
1313
<div id="mail-thread-header">
@@ -106,7 +106,7 @@ export default {
106106
loading: true,
107107
message: undefined,
108108
errorMessage: '',
109-
error: undefined,
109+
errorTitle: '',
110110
expandedThreads: [],
111111
participantsToDisplay: 999,
112112
resizeDebounced: debounce(500, this.updateParticipantsToDisplay),
@@ -290,7 +290,7 @@ export default {
290290
async resetThread() {
291291
this.expandedThreads = [this.threadId]
292292
this.errorMessage = ''
293-
this.error = undefined
293+
this.errorTitle = ''
294294
if (this.mainStore.getPreference('layout-message-view', 'threaded') === 'threaded') {
295295
await this.fetchThread()
296296
}
@@ -301,7 +301,7 @@ export default {
301301
async fetchThread() {
302302
this.loading = true
303303
this.errorMessage = ''
304-
this.error = undefined
304+
this.errorTitle = ''
305305
const threadId = this.threadId
306306
307307
try {
@@ -328,7 +328,7 @@ export default {
328328
} catch (error) {
329329
logger.error('could not load envelope thread', { threadId, error })
330330
if (error?.response?.status === 403) {
331-
this.error = t('mail', 'Could not load your message thread')
331+
this.errorTitle = t('mail', 'Could not load your message thread')
332332
this.errorMessage = t('mail', 'The thread doesn\'t exist or has been deleted')
333333
this.loading = false
334334
} else if (error?.response?.status === 500) {

0 commit comments

Comments
 (0)