-
Notifications
You must be signed in to change notification settings - Fork 230
Investigate how to improve error responses back to client #296
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
Comments
This is probably a sign of not properly catching the error which is generating the HTTP 500, if not, one way I handled this in a different stack was to send additional headers with the error details, but this would involve the client knowing about these headers. |
@lresende hmm - the contextual messages I'm referring to are produced from error handlers, but perhaps they themselves should be re-throwing a more HTTP-like error and reason? We looked into this a while back and I think its more involved than that. Sounds like you're volunteering here - thanks! 😃 Here's some code that, when it occurs, comes back with 403 (good), but a generic message (bad):
It would be great to get the message to flow as well. |
@lresende - I can get the custom error message to flow back to the caller if both of the following are done:
and
Unless I'm missing something, we'd need to define a range of error codes for the various scenarios in which we'd want custom messages. |
Correction: Revisiting this situation (after discussing with @lresende and @sanjay-saxena) there are two changes required, but things are much better.
Unfortunately, the latter requires the additional named argument to be added to Kernel Gateway's JSONErrorsMixin. However, once added, we can then use registered or unregistered status codes and the custom message will flow to the client. I will be opening an issue in Kernel Gateway that references this issue. In the meantime, we can move forward with refactoring based on the first item. Please note though, that until Kernel Gateway is updated with the second item, we must retain the built-in status codes, else tornado's |
This PR also requires [Kernel Gateway PR 284](jupyter-server/kernel_gateway#284) In absence of that PR, the default message corresponding to the status code will be returned to the caller. So this PR is essentially preparation to have custom error messages returned. Fixes jupyter-server#296
This PR also requires [Kernel Gateway PR 284](jupyter-server/kernel_gateway#284) In absence of that PR, the default message corresponding to the status code will be returned to the caller. So this PR is essentially preparation to have custom error messages returned. Fixes jupyter-server#296
When the EG server encounters an exception, primarily during a kernel's startup, it will often times produce a contextual message along with the traceback in the log file. However, all the notebook client gets (behind the
Kernel Error
button) is a local traceback and the canned reason that is associated with the HTTP error code (e.g., 500: Server Error).We should look into the error response plumbing to see if there are any ways we can propagate, at a minimum, the EG's contextual message and, if possible, its traceback as well.
The text was updated successfully, but these errors were encountered: