Function decode_json_response

Source
pub fn decode_json_response<T>(bytes: &[u8]) -> Result<T, PolarsError>
where T: for<'de> Deserialize<'de>,
Expand description

Utility for decoding JSON that adds the response value to the error message if decoding fails. This makes it much easier to debug errors from parsing network responses.