Navigation Menu

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

Parse Sabre Exception in OC.Files.Client and file-upload #28620

Merged
merged 1 commit into from Aug 10, 2017

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Aug 8, 2017

Description

In case of error, instead of a generic error message, an upload will
display whichever message is returned in the Sabre Exception, if
applicable.

Related Issue

Part of #24304.
Should fix owncloud/files_antivirus#163

Motivation and Context

See #24304

How Has This Been Tested?

I manually tested this by triggering Sabre exception on upload from the server side (hard-coded exception). Tested with chunked upload error and regular upload error. The message from the server is displayed in the client.

Screenshots (if appropriate):

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)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

In case of error, instead of a generic error message, an upload will
display whichever message is returned in the Sabre Exception, if
applicable.
@PVince81 PVince81 added this to the development milestone Aug 8, 2017
@PVince81 PVince81 self-assigned this Aug 8, 2017
@PVince81
Copy link
Contributor Author

PVince81 commented Aug 8, 2017

Yes, I did have to parse the sabre exception in two places... This is really messy because we have multiple ways of doing queries, and the one for the PUT upload is managed by jquery.fileupload, so it needed its own code path... I hope one day we can find a way to consolidate all.

@VicDeo please review and test with owncloud/files_antivirus#163

@jvillafanez
Copy link
Member

I don't think there is a good way out for this...
👍 as long as it works.

@VicDeo
Copy link
Member

VicDeo commented Aug 9, 2017

Master
screenshot_20170810_004024

This branch
screenshot_20170810_004405

so yes, fixes owncloud/files_antivirus#163

@PVince81
Copy link
Contributor Author

Thanks, guys!

@PVince81 PVince81 merged commit 368769e into master Aug 10, 2017
@PVince81 PVince81 deleted the parse-sabre-exception-upload branch August 10, 2017 06:56
@PVince81
Copy link
Contributor Author

stable10: #28635

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oc 10.0.2 error message only "unsupported media type"
4 participants