Show More
@@ -106,7 +106,11 b' class SessionHandler(IPythonHandler):' | |||||
106 | def delete(self, session_id): |
|
106 | def delete(self, session_id): | |
107 | # Deletes the session with given session_id |
|
107 | # Deletes the session with given session_id | |
108 | sm = self.session_manager |
|
108 | sm = self.session_manager | |
109 | sm.delete_session(session_id) |
|
109 | try: | |
|
110 | sm.delete_session(session_id) | |||
|
111 | except KeyError: | |||
|
112 | # the kernel was deleted but the session wasn't! | |||
|
113 | raise web.HTTPError(410, "Kernel deleted before session") | |||
110 | self.set_status(204) |
|
114 | self.set_status(204) | |
111 | self.finish() |
|
115 | self.finish() | |
112 |
|
116 |
@@ -523,12 +523,14 b' define([' | |||||
523 | var ajax_error_msg = function (jqXHR) { |
|
523 | var ajax_error_msg = function (jqXHR) { | |
524 | // Return a JSON error message if there is one, |
|
524 | // Return a JSON error message if there is one, | |
525 | // otherwise the basic HTTP status text. |
|
525 | // otherwise the basic HTTP status text. | |
526 |
if (jqXHR.responseJSON && jqXHR.responseJSON. |
|
526 | if (jqXHR.responseJSON && jqXHR.responseJSON.traceback) { | |
|
527 | return jqXHR.responseJSON.traceback; | |||
|
528 | } else if (jqXHR.responseJSON && jqXHR.responseJSON.message) { | |||
527 | return jqXHR.responseJSON.message; |
|
529 | return jqXHR.responseJSON.message; | |
528 | } else { |
|
530 | } else { | |
529 | return jqXHR.statusText; |
|
531 | return jqXHR.statusText; | |
530 | } |
|
532 | } | |
531 | } |
|
533 | }; | |
532 | var log_ajax_error = function (jqXHR, status, error) { |
|
534 | var log_ajax_error = function (jqXHR, status, error) { | |
533 | // log ajax failures with informative messages |
|
535 | // log ajax failures with informative messages | |
534 | var msg = "API request failed (" + jqXHR.status + "): "; |
|
536 | var msg = "API request failed (" + jqXHR.status + "): "; |
General Comments 0
You need to be logged in to leave comments.
Login now