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

🔨 Add http_exception handler to Admin class #694

Merged
merged 4 commits into from
Jan 30, 2024
Merged

Conversation

agn-7
Copy link
Contributor

@agn-7 agn-7 commented Jan 11, 2024

Fixed the exception handler to bring a template for the errors using an awaitable response to be matched with Starlette exception handler type hint:

HTTPExceptionHandler = typing.Callable[
    ["Request", Exception], typing.Union["Response", typing.Awaitable["Response"]]
]

This PR solved the #693 issue.

@agn-7
Copy link
Contributor Author

agn-7 commented Jan 11, 2024

Here's the result after changes:

2024-01-11_12-23

@agn-7
Copy link
Contributor Author

agn-7 commented Jan 11, 2024

I don't know what's wrong with this CI? I have no issues with mypy sqladmin in my local!

@aminalaee
Copy link
Owner

Thanks for the PR, I will check it soon 👍

Copy link
Owner

@aminalaee aminalaee left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution 👍

@aminalaee aminalaee merged commit 0ed32e6 into aminalaee:main Jan 30, 2024
7 checks passed
@aminalaee aminalaee mentioned this pull request Feb 20, 2024
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.

None yet

2 participants