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

feat(exceptions): Implement custom HTTP exceptions and global FastAPI… #72

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danielmoumeny212
Copy link
Contributor

… exception handler to Pynest

  • Add HttpException base class for custom HTTP exceptions
  • Create specific exception classes for common HTTP status codes
  • Implement FastAPI exception handlers for consistent JSON responses
  • Integrate custom exceptions with Pynest routes for improved error handling

… exception handler to Pynest

- Add HttpException base class for custom HTTP exceptions
- Create specific exception classes for common HTTP status codes
- Implement FastAPI exception handlers for consistent JSON responses
- Integrate custom exceptions with Pynest  routes for improved error handling
@ItayTheDar ItayTheDar self-requested a review July 29, 2024 09:21
"status_code": status_code
}

def test_exceptions_inheritance():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please create test for every custom exception?

@@ -1,3 +1,5 @@
from http import HTTPStatus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a md file under docs that demonstrate the usage of the different exceptions, documentation is the most important part of it because this is how people are going to use those pieces of code. After creating the markdown, add it to the static docs site under the mkdosc.yml file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

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.

2 participants