litestar-org/litestar-fullstack

Mypy Type Error due to Recent Changes to Litestar Middleware

Faolain opened this issue · 1 comments

New issue has surfaced due to the new changes to the litestar exception middleware handling that has been merged in litestar-org/litestar@8828401 here leading to a mypy failure on pre-commit

Screenshot 2023-08-06 at 11 12 41 PM

Issue on Line 120 where create_exception_response is expecting two arguments, with the first one being of type Request[Any, Any, Any] and the second being an exception. However, in the previous version only the exception is being passed.

Screenshot 2023-08-06 at 11 14 07 PM

Reference new middleware implementation from litestar:
Screenshot 2023-08-06 at 11 24 01 PM

cofin commented

resolved by #44