aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-01-12 10:34:26 +0100
committerGitHub <noreply@github.com>2024-01-12 10:34:26 +0100
commit239213abfe59dc749129d4b0728c191dcc636513 (patch)
treedfa82aa8a39f86227095ef4036a4dc04a5dc482b /apps/files
parent3463ed538c327cab4767f8af58cf28ef1133370b (diff)
parente181fad68b65da00e8e0fbf530131c2a3515222c (diff)
downloadnextcloud-server-239213abfe59dc749129d4b0728c191dcc636513.tar.gz
nextcloud-server-239213abfe59dc749129d4b0728c191dcc636513.zip
Merge pull request #42598 from nextcloud/fix/error-files-message
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/views/FilesList.vue11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue
index 8dce2fe469c..a3ef2c5f007 100644
--- a/apps/files/src/views/FilesList.vue
+++ b/apps/files/src/views/FilesList.vue
@@ -541,9 +541,6 @@ export default defineComponent({
} else if (status === 403) {
showError(this.t('files', 'Operation is blocked by access control'))
return
- } else if (status !== 0) {
- showError(this.t('files', 'Error when assembling chunks, status code {status}', { status }))
- return
}
// Else we try to parse the response error message
@@ -552,12 +549,18 @@ export default defineComponent({
const response = await parser.parseStringPromise(upload.response?.data)
const message = response['s:message'][0] as string
if (typeof message === 'string' && message.trim() !== '') {
- // Unfortunatly, the server message is not translated
+ // The server message is also translated
showError(this.t('files', 'Error during upload: {message}', { message }))
return
}
} catch (error) {}
+ // Finally, check the status code if we have one
+ if (status !== 0) {
+ showError(this.t('files', 'Error during upload, status code {status}', { status }))
+ return
+ }
+
showError(this.t('files', 'Unknown error during upload'))
},