Skip to content

Commit

Permalink
Show error message on failing upload
Browse files Browse the repository at this point in the history
  • Loading branch information
elizavetaRa authored Oct 27, 2022
1 parent 215b74e commit 9f01c80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ export default {
if (error) {
// TODO: Remove code as soon as https://github.com/tus/tus-js-client/issues/448 is solved
let errorMessage = this.$gettext('Unknown error')
let errorMessage = error.message || this.$gettext('Unknown error')
if (error.message.includes('response code: 507')) {
errorMessage = this.$gettext('Quota exceeded')
}
Expand All @@ -566,7 +566,7 @@ export default {
case 507:
return this.$gettext('Quota exceeded')
default:
return this.$gettext('Unknown error')
return error.message || this.$gettext('Unknown error')
}**/
}
},
Expand Down

0 comments on commit 9f01c80

Please sign in to comment.