Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set response status after transforms #165

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

danielgtaylor
Copy link
Owner

Some transforms may set or update headers, and if the status has already been sent then header updates will fail silently. This ensures the status is sent after the transforms, which has the added benefit of producing non-success status codes if transforms panic or fail.

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
huma.go 86.33% <100.00%> (-0.03%) ⬇️

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@danielgtaylor danielgtaylor merged commit 3130224 into main Nov 6, 2023
4 of 5 checks passed
@danielgtaylor danielgtaylor deleted the status-after-transform branch November 6, 2023 16:19
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.

1 participant