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

Added locked error message #9940

Merged
merged 7 commits into from
Nov 16, 2023
Merged
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ export default defineComponent({
return this.$gettext('Upload cancelled')
}
if (Object.keys(this.errors).length) {
const isLocked = Object.values(this.errors).some((error: any) => error.statusCode === 423)
const isLocked = Object.values(this.errors).some((error: any) => error?.statusCode === 423)
if (isLocked) {
return this.$gettext('Upload failed because the current folder is locked.')
return this.$gettext('Upload failed: Locked')
JammingBen marked this conversation as resolved.
Show resolved Hide resolved
}
return this.$gettext('Upload failed')
}
Expand Down Expand Up @@ -630,6 +630,9 @@ export default defineComponent({
}

const errorObject = formatErrorMessageToObject(error.message)
if (this.errors[item.meta.uploadId]?.statusCode === 423) {
return this.$gettext('Upload folder is locked')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kulmann @tbsbdr Suggestions for text? How about The folder you're uploading to is locked?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, works for me 👍

}

switch (errorObject.responseCode) {
case 507:
Expand Down