pub async fn from_response(resp: Response) -> ApiErrorExpand description
Extract an api_bones::ApiError from a reqwest::Response.
- If the response has
Content-Type: application/problem+json, the body is deserialized as aapi_bones::ProblemJsonand converted into anapi_bones::ApiError. - Otherwise a generic
api_bones::ApiErroris constructed from the HTTP status code with the raw body text as thedetail.