Skip to content

feat: retain response body in UnexpectedStatusCodeError#1616

Merged
ernado merged 3 commits intoogen-go:mainfrom
shyouhei:feature/to/retain/response/body/from/defer/closing/by/its/caller
Feb 15, 2026
Merged

feat: retain response body in UnexpectedStatusCodeError#1616
ernado merged 3 commits intoogen-go:mainfrom
shyouhei:feature/to/retain/response/body/from/defer/closing/by/its/caller

Conversation

@shyouhei
Copy link
Contributor

Thank you for merging #1530! After using it for a while I noticed that the response's Body is missing, because it is already Close()ed by a defer (which effectively discards the unread contents). This isn't very useful. Why not save this info for later inspection as well?

@shyouhei
Copy link
Contributor Author

I can update generated codes once it's the way to go.

@ernado
Copy link
Member

ernado commented Feb 10, 2026

@shyouhei LGTM

@ernado ernado force-pushed the feature/to/retain/response/body/from/defer/closing/by/its/caller branch from 621dff4 to 33475bf Compare February 15, 2026 12:31
@ernado ernado merged commit 2889b6c into ogen-go:main Feb 15, 2026
14 checks passed
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