Closed austincollinpena closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.83%. Comparing base (
40bda46
) to head (308ca4f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The transformAndWrite
function in huma.go
has been updated to exclude the tval
value from panic messages. This change aims to prevent server unresponsiveness caused by large values in the panic message.
File | Change Summary |
---|---|
huma.go | Removed tval from panic messages in transformAndWrite function to prevent server unresponsiveness. |
In the code where errors might arise,
We trimmed the logs, to our surprise.
No more large values causing dismay,
Just clear, concise errors, come what may.
🐇✨ Code runs smoother, night and day!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Yeah I agree it's a shame to lose the logging. Maybe there's a follow up PR I can make to help?
I thought about just logging the first N characters of the response but because it's an any
type I wasn't sure the best way to do that.
Maybe json.parse first then log the first n characters?
Yeah I ran into the same, but JSON marshaling could work and shouldn't be too expensive.
On Wed, Jun 12, 2024 at 9:27 AM austincollinpena @.***> wrote:
Yeah I agree it's a shame to lose the logging. Maybe there's a follow up PR I can make to help?
I thought about just logging the first N characters of the response but because it's an any type I wasn't sure the best way to do that.
Maybe json.parse first then log the first n characters?
— Reply to this email directly, view it on GitHub https://github.com/danielgtaylor/huma/pull/479#issuecomment-2163456585, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2CSVYXNYTTYFTNWHVVO3ZHBZFLAVCNFSM6AAAAABJEWXGKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGQ2TMNJYGU . You are receiving this because you modified the open/close state.Message ID: @.***>
-- Daniel
Summary by CodeRabbit