Skip to content

Print Response Body On Error #233

@tustvold

Description

@tustvold

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

We currently use error_for_status to map HTTP status codes to errors, unfortunately this does not include the response body. This can complicate debugging issues, as often the response text can help identify what the issue is.

This is especially useful for 4xx errors, where there may be multiple possible causes

Describe the solution you'd like

Include the response body on 4xx errors

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions