Skip to content

Catch exceptions in files ajax calls - #16718

Merged
DeepDiver1975 merged 1 commit into
masterfrom
files-catchajaxexceptions
Jun 5, 2015
Merged

DeepDiver1975 merged 1 commit into
masterfrom
files-catchajaxexceptions

Conversation

@PVince81

@PVince81 PVince81 commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

Needed to be able to show the locking exceptions: #16701

  • rename
  • move
  • new file
  • new folder
  • delete
  • upload

@PVince81 PVince81 added this to the 8.1-current milestone Jun 3, 2015
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@ghost

ghost commented Jun 3, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/12672/
🚀 Test PASSed.🚀
chuck

@karlitschek

Copy link
Copy Markdown
Contributor

good catch 👍

@PVince81

PVince81 commented Jun 3, 2015

Copy link
Copy Markdown
Contributor Author

Download is much more tricky because at the time where LockedException is thrown, the headers are already send (including content-disposition). This causes the browser to show a generic error page "invalid_response" instead of the actual error page returned by the server.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Download is much more tricky because at the time where LockedException is thrown, the headers are already send (including content-disposition). This causes the browser to show a generic error page "invalid_response" instead of the actual error page returned by the server.

can we delay sending of these headers? we also need to send back a proper http status code.

@PVince81

PVince81 commented Jun 3, 2015

Copy link
Copy Markdown
Contributor Author

I hope so. But from the current code structure it might be tricky... Because we get the exception from the readfile() call. One idea would be to try and explicitly get a shared lock on the file before sending the headers, to make sure we get the exception early.

@PVince81

PVince81 commented Jun 3, 2015

Copy link
Copy Markdown
Contributor Author

I'd like to investigate the download case separately.

If we get this merged, it will be easier for @jnfrmarks and @SergioBertolinSG to test the other file operations.

Please review @DeepDiver1975 @icewind1991

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@PVince81 let treat the remaining ops in a second pr

@DeepDiver1975

Copy link
Copy Markdown
Contributor

👍

DeepDiver1975 added a commit that referenced this pull request Jun 5, 2015
@DeepDiver1975
DeepDiver1975 merged commit ccbb1cc into master Jun 5, 2015
@DeepDiver1975
DeepDiver1975 deleted the files-catchajaxexceptions branch June 5, 2015 10:01
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 12, 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.

4 participants