fix(files): improve upload error handling for DAV responses#61058
Draft
joshtrichards wants to merge 3 commits into
Draft
fix(files): improve upload error handling for DAV responses#61058joshtrichards wants to merge 3 commits into
joshtrichards wants to merge 3 commits into
Conversation
…ming 403/404/409 Signed-off-by: Josh <josh.t.richards@gmail.com>
Member
Author
|
/compile |
Signed-off-by: Josh <josh.t.richards@gmail.com>
Member
Author
|
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve upload error handling in
apps/files/src/views/FilesList.vueby parsing the DAV error payload before falling back to generic HTTP status handling.This fixes cases where the frontend currently assumes:
403means access control blocked the operation404or409means the target folder no longer existsIn practice, the DAV backend may include structured XML with more specific details such as:
s:exceptions:messageo:reasono:retryo:hintThis change makes the upload error handling more accurate by:
404/409assumptionsChanges
FilesList.vue403responses using the DAV exception payloado:reason/s:messageover generic status-only messaging404/409target-folder messaging as a fallback only413Follow-up note
There is a likely backend contract inconsistency worth reviewing separately:
OCP\Files\NotEnoughSpaceExceptionis currently converted in DAV toEntityTooLarge/ HTTP413507 Insufficient Storage413, it would be helpful to provide structured DAV payload hints so clients can reliably distinguish:This PR does not change the backend contract; it only makes the frontend more robust against the current behavior.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)