danielgtaylor / huma

Huma REST/HTTP API Framework for Golang with OpenAPI 3.1
https://huma.rocks/
MIT License
1.87k stars 138 forks source link

fix: more robust nil check for link transformer #418

Closed danielgtaylor closed 4 months ago

danielgtaylor commented 4 months ago

This uses reflection to check for nil which is more robust and can prevent a panic/500 error from happening if the operation returns successful with a nil body.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.71%. Comparing base (babafa8) to head (7f74b7d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #418 +/- ## ========================================== + Coverage 92.65% 92.71% +0.05% ========================================== Files 21 21 Lines 3539 3540 +1 ========================================== + Hits 3279 3282 +3 + Misses 221 220 -1 + Partials 39 38 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.