Skip to content

feat: pass raw response body in UnexpectedStatusCodeError#1530

Merged
ernado merged 5 commits intoogen-go:mainfrom
shyouhei:feature/to/add/a/raw/response/field/to/the/error/itself
Sep 17, 2025
Merged

feat: pass raw response body in UnexpectedStatusCodeError#1530
ernado merged 5 commits intoogen-go:mainfrom
shyouhei:feature/to/add/a/raw/response/field/to/the/error/itself

Conversation

@shyouhei
Copy link
Contributor

A client sometimes encounters a truly unexpected status code from the server for various reasons. The client should not trash the response away then, to instead let the caller know what was going on. In such cases, that bit might be useful for for instance inspection, logging, and/or debugging purposes.

A client sometimes encounters a truly unexpected status code from the
server for various reasons.  The client should not trash the response
away then, to instead let the caller know what was going on.  In such
cases, that bit might be useful for for instance inspection, logging,
and/or debugging purposes.
}
}

// (Remains here for backwards compatibility)
Copy link
Member

Choose a reason for hiding this comment

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

Please add standard deprecation notice instead. https://go.dev/wiki/Deprecated
Like Deprecated: ....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done @ 54cd864. Thank you!

@ernado
Copy link
Member

ernado commented Sep 16, 2025

Looks ok, please make pipeline green so we can merge this.

@ernado ernado merged commit 9ccb545 into ogen-go:main Sep 17, 2025
@shyouhei shyouhei deleted the feature/to/add/a/raw/response/field/to/the/error/itself branch September 17, 2025 07:57
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