Skip to content

Display full HTML body response for errors#321

Open
oliverli wants to merge 1 commit intomasterfrom
oliver/display-full-html-body-response-for-errors
Open

Display full HTML body response for errors#321
oliverli wants to merge 1 commit intomasterfrom
oliver/display-full-html-body-response-for-errors

Conversation

@oliverli
Copy link
Copy Markdown
Collaborator

@oliverli oliverli commented Apr 15, 2026

What and why?

In the event of an error response, don't silently swallow the HTTP response body as it can contain useful information as to the source of the error (e.g. why it returned a 403), e.g. in the case of Datadog APIs.

How?

First tries to parse it as an array of JSON:API errors. If it isn't, then it returns the full HTTP response body in error details

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@oliverli oliverli marked this pull request as ready for review April 15, 2026 19:49
@oliverli oliverli requested a review from yoannmoinet as a code owner April 15, 2026 19:50
Copy link
Copy Markdown
Member

@yoannmoinet yoannmoinet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants