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

Conversation

jacob-nv
Copy link
Contributor

Description

Added error message in failed attempt of uploading to locked folder

Related Issue

Screenshots:

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@jacob-nv jacob-nv requested a review from JammingBen November 14, 2023 13:49
@jacob-nv jacob-nv self-assigned this Nov 14, 2023
Copy link

update-docs bot commented Nov 14, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

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

We already have some error handling in place here: https://github.com/owncloud/web/blob/master/packages/web-runtime/src/components/UploadInfo.vue#L630. Could you please add it there?

Also, please add a changelog item 🙂

Edit: Pipeline seems to fail because of some unrelated change, rebasing with current master should fix it though.

@jacob-nv
Copy link
Contributor Author

We already have some error handling in place here: https://github.com/owncloud/web/blob/master/packages/web-runtime/src/components/UploadInfo.vue#L630. Could you please add it there?

Also, please add a changelog item 🙂

Edit: Pipeline seems to fail because of some unrelated change, rebasing with current master should fix it though.

Not able to move the error message. I'm getting null responseCode there.

@JammingBen
Copy link
Contributor

I see. Can you maybe retrieve the error for the file via this.errors[file.meta.uploadId] and then check for status code 423? I'd really like to have to error handling in one place here.

@kulmann
Copy link
Member

kulmann commented Nov 15, 2023

I see. Can you maybe retrieve the error for the file via this.errors[file.meta.uploadId] and then check for status code 423? I'd really like to have to error handling in one place here.

Fully agree UX-wise. The error in the title section of the upload info widget needs to stay short.

@jacob-nv
Copy link
Contributor Author

I see. Can you maybe retrieve the error for the file via this.errors[file.meta.uploadId] and then check for status code 423? I'd really like to have to error handling in one place here.

Fully agree UX-wise. The error in the title section of the upload info widget needs to stay short.

What would convey the message properly?

Upload failed: Locked
Upload failed: Folder is locked

@jacob-nv
Copy link
Contributor Author

I see. Can you maybe retrieve the error for the file via this.errors[file.meta.uploadId] and then check for status code 423? I'd really like to have to error handling in one place here.

But you still have 2 places where you check for errors. Title of the window and then individual items.
I added error message for that "window" title, you are asking about error message for individual items. So should it be applied to both or only the items while window title has generic "Upload failed"?

@jacob-nv
Copy link
Contributor Author

Something like this? @JammingBen @kulmann
image

packages/web-runtime/src/components/UploadInfo.vue Outdated Show resolved Hide resolved
@@ -626,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
Member

Choose a reason for hiding this comment

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

yep, works for me 👍

Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

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

Nice 👍

Needs another rebase with current master though, there have been quite a few pipeline changes recently.

Copy link

sonarcloud bot commented Nov 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@JammingBen JammingBen merged commit 0661875 into owncloud:master Nov 16, 2023
4 checks passed
AlexAndBear pushed a commit that referenced this pull request Dec 13, 2023
* added locked error message

* updated locked error message

* removed title locked error message, added changelog

* updated locked error message text

* lint fix locked error message text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

writing to locked files/folders give only a generic error message
3 participants