ensure_success

Function ensure_success 

Source
pub fn ensure_success(response: &Response) -> Result<(), ResponseError>
Expand description

Ensure the given response is successful. If it isn’t, a corresponding ResponseError is returned.