You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in psf/requests#4842, when the simplejson module is present, requests preferentially uses this module rather than the json module when executing, among other calls, Response.json().
Problem
Currently, the deprecated display_response function makes a call to response.json(), but then expects the exception, if any, to be a json exception, rather than a simplejson exception
This means that a simplejson exception, if thrown, is uncaught until it passes up to the caller of display_response, which includes json_responder.retrieve_response_from_Endpoint.
Proposal
Either simplejson exceptions should be caught, if it is possible that they will be thrown, or the possibility that they will be thrown should be entirely avoided.
The text was updated successfully, but these errors were encountered:
Background
As described in psf/requests#4842, when the
simplejson
module is present,requests
preferentially uses this module rather than thejson
module when executing, among other calls,Response.json()
.Problem
Currently, the deprecated
display_response
function makes a call toresponse.json()
, but then expects the exception, if any, to be ajson
exception, rather than asimplejson
exceptionThis means that a
simplejson
exception, if thrown, is uncaught until it passes up to the caller ofdisplay_response
, which includesjson_responder.retrieve_response_from_Endpoint
.Proposal
Either
simplejson
exceptions should be caught, if it is possible that they will be thrown, or the possibility that they will be thrown should be entirely avoided.The text was updated successfully, but these errors were encountered: