Skip to content
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

Add 'reason' field to JSON error responses #2958

Merged

Conversation

@kevin-bates
Copy link
Member

@kevin-bates kevin-bates commented Oct 19, 2017

During the deprecation/removal of the @json_errors decorator, the
reason field was not carried forward into the compatible replacement
method APIHandler.write_error. This broke some client (tests) that
relied on that field's presence.

Fixes #2957.

During the deprecation/removal of the `@json_errors` decorator, the
`reason` field was not carried forward into the compatible replacement
method `APIHandler.write_error`.  This broke some client (tests) that
relied on that field's presence.

Fixes jupyter#2957.
@takluyver
Copy link
Member

@takluyver takluyver commented Oct 31, 2017

@kevin-bates looking back at the old decorator code before #2853, it set reason to e.reason when e is an HTTPError, and None otherwise. I'd suggest that we replicate that.

Loading

@kevin-bates
Copy link
Member Author

@kevin-bates kevin-bates commented Oct 31, 2017

@takluyver - yeah, that's probably the best approach. Change committed.

Loading

@takluyver
Copy link
Member

@takluyver takluyver commented Oct 31, 2017

Thanks. I'll merge tomorrow if no-one says otherwise.

Loading

@takluyver takluyver merged commit 9a5c2c0 into jupyter:master Nov 1, 2017
4 checks passed
Loading
@kevin-bates kevin-bates deleted the fix-2957-add-reason-to-json-errors branch Nov 1, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants