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 custom HTTPException with argument names #302

Merged
merged 4 commits into from
Sep 28, 2024

Conversation

aniketmaurya
Copy link
Collaborator

@aniketmaurya aniketmaurya commented Sep 27, 2024

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #301 : custom Exception HTTPException(detail="...", status_code=400) doesn't work. This PR fixes that.

  • fastapi.HTTPException is not pickleable, we add a __reduce__ method and put the correct exception in the multiprocessing queue.

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@aniketmaurya aniketmaurya added the bug Something isn't working label Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95%. Comparing base (e8ffd36) to head (894ed6a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #302   +/-   ##
===================================
  Coverage    95%    95%           
===================================
  Files        19     19           
  Lines      1237   1257   +20     
===================================
+ Hits       1170   1195   +25     
+ Misses       67     62    -5     

@aniketmaurya aniketmaurya enabled auto-merge (squash) September 27, 2024 08:40
@aniketmaurya aniketmaurya self-assigned this Sep 27, 2024
@aniketmaurya aniketmaurya merged commit 6f53398 into main Sep 28, 2024
20 checks passed
@aniketmaurya aniketmaurya deleted the aniket/fix/http-exception branch September 28, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom HTTPException Not Working as Expected
2 participants