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: use errors.As to get StatusError, enabling wrapping #381

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

danielgtaylor
Copy link
Owner

This updates the code to allow wrapping of the HTTP status errors, which can be useful to provide additional context for logging among other things. Adds a couple of tests to ensure it works as expected.

Fixes #380.

Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.51%. Comparing base (864ecb4) to head (1971cc6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #381   +/-   ##
=======================================
  Coverage   92.51%   92.51%           
=======================================
  Files          20       20           
  Lines        3513     3514    +1     
=======================================
+ Hits         3250     3251    +1     
  Misses        224      224           
  Partials       39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor merged commit 6ff449e into main Apr 13, 2024
5 checks passed
@danielgtaylor danielgtaylor deleted the use-error-as-for-status branch April 13, 2024 16:20
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.

huma.NewError doesn't support error wrapping.
1 participant