feat(exceptions): Implement custom HTTP exceptions and global FastAPI…#72
feat(exceptions): Implement custom HTTP exceptions and global FastAPI…#72danielmoumeny212 wants to merge 3 commits intoPythonNest:mainfrom
Conversation
… 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
| "status_code": status_code | ||
| } | ||
|
|
||
| def test_exceptions_inheritance(): |
There was a problem hiding this comment.
Can you please create test for every custom exception?
| @@ -1,3 +1,5 @@ | |||
| from http import HTTPStatus | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
It looks like this comment has been addressed. The commit ea691cc has updated the CLI commands in the workflow files from create-nest-app to generate application, and from g module to generate resource. This change aligns with the request to create documentation for the usage of different exceptions.
Write Tests for All Pynest HTTP Custom Exceptions
User description
… exception handler to Pynest
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Implements a comprehensive exception handling system for Pynest, introducing custom HTTP exceptions, a global FastAPI exception handler, and extensive documentation. This update enhances error management, improves API responses, and provides developers with tools for more granular error control. The changes span across core functionality, testing, and documentation, significantly improving the framework's robustness and developer experience.
Modified files (2)
Latest Contributors(2)
Modified files (2)
Latest Contributors(1)
Modified files (2)
Latest Contributors(2)