Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a5c2c0

Browse files
authored
Merge pull request#2958 from kevin-bates/fix-2957-add-reason-to-json-errors
Add 'reason' field to JSON error responses
2 parentse7f69cc +ed3b0e4 commit9a5c2c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎notebook/base/handlers.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,10 @@ def write_error(self, status_code, **kwargs):
486486
e=exc_info[1]
487487
ifisinstance(e,HTTPError):
488488
reply['message']=e.log_messageormessage
489+
reply['reason']=e.reason
489490
else:
490491
reply['message']='Unhandled error'
492+
reply['reason']=None
491493
reply['traceback']=''.join(traceback.format_exception(*exc_info))
492494
self.log.warning(reply['message'])
493495
self.finish(json.dumps(reply))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp