-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Files app ajax call exception must be shown in popup #5226
Comments
there is a try catch block in index.php - any unhandled exception will go in there. |
great idea. I'm not sure if this is a topic for OCS because this is only for debugging as far as i understand. |
It will help while debugging but it will also help in regular/productive operations where exceptions are no handled properly in the code. |
Ideally I'd like to return JSON for when the call is made using Ajax. |
Can you explain the usecase why we want to expos this via a public REST api? I can't see it at the moment. |
I think what @DeepDiver1975 means is that if you make a REST API call and that one causes an exception on the server, that you'd still get a stack trace (or at least the exception's message) in the response instead of... whatever is returned now ? I'd say we can consider this as a separate use case / issue. In this ticket I'd prefer to focus on showing the exceptions caused by ajax calls in the UI. |
yes please. |
All failed ajax calls in the app will display an exception dialog. This is achieved using a global listener to "ajaxError". The dialog will show the exception returned by the server in JSON format with a stack trace if available. Fixes #5226
@PVince81 this can be closed - right? |
Closing |
Steps to reproduce
Hard to reproduce, but met while working on #5199
Expected result
Exception / stack trace shown in popup dialog
Actual result
Fails silently and stays in the same directory (and URL points to the wrong subdir)
Ideally the server should return the strack trace inside a JSON object instead of returning a whole HTML page when calling in ajax mode. This can be detected from the XmlHttpRequest headers.
The text was updated successfully, but these errors were encountered: