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(litestar): add default NotFoundError exception handler #294

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

noamsto
Copy link
Contributor

@noamsto noamsto commented Nov 19, 2024

Description

Add a default exception handler for NotFoundError in the SQLAlchemyPlugin. The handler returns a standardized 404 response with JSON content.

The handler is automatically registered if no other handler for NotFoundError is configured.

Closes

#275

Add a default exception handler for NotFoundError in the SQLAlchemyPlugin. The handler returns a standardized 404 response with JSON content.

The handler is automatically registered if no other handler for NotFoundError is configured.

Signed-off-by: Noam Stolero <[email protected]>
@noamsto noamsto requested review from a team as code owners November 19, 2024 16:04
@noamsto
Copy link
Contributor Author

noamsto commented Nov 19, 2024

@cofin ,
I'm not sure I registered the handler in the correct location, and I wasn't sure how to test it, if tests are needed.
Thanks!

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.

1 participant