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 value if HTTP status is enum #192

Merged

Conversation

nikstuckenbrock
Copy link
Contributor

As mentioned in #190 the instrumentator has a bug when using the http.HTTPStatus enumeration for a status code response. If fixed this bug and added some tests to verify.

I would be very thankful if you would add the HACKTOBERFEST-ACCEPTED to this pull request.

@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Merging #192 (7ebe9b7) into master (729862f) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
+ Coverage   90.81%   90.84%   +0.03%     
==========================================
  Files           5        5              
  Lines         283      284       +1     
==========================================
+ Hits          257      258       +1     
  Misses         26       26              
Impacted Files Coverage Δ
...rc/prometheus_fastapi_instrumentator/middleware.py 87.50% <100.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@trallnag trallnag linked an issue Feb 22, 2023 that may be closed by this pull request
@trallnag trallnag force-pushed the bugfix/http-status-code-enumeration branch from ba68107 to d821585 Compare February 22, 2023 14:39
@trallnag trallnag changed the title If status_code is HTTPStatus enumeration use value fix: Use value if HTTP status is enum Feb 22, 2023
@trallnag trallnag force-pushed the bugfix/http-status-code-enumeration branch from e76ef67 to 7ebe9b7 Compare February 22, 2023 15:06
@trallnag trallnag merged commit be4fa62 into trallnag:master Feb 22, 2023
@trallnag
Copy link
Owner

Thanks. Sorry for missing Hacktober

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.

HTTPStatus.NOT_FOUND results in status "Hxx" when grouping (with fix)
3 participants