Skip to content

fix: propagate exception_handlers to versioned sub-apps - #80

Open
dajiaohuang wants to merge 1 commit into
DeanWay:masterfrom
dajiaohuang:fix/exception-handlers
Open

dajiaohuang wants to merge 1 commit into
DeanWay:masterfrom
dajiaohuang:fix/exception-handlers

Conversation

@dajiaohuang

Copy link
Copy Markdown

exception_handlers passed to VersionedFastAPI via **kwargs were not being passed to the versioned sub-apps, causing custom exception handlers to fail with 'Caught handled exception, but response already started.'

Also filters out non-APIRoute entries (e.g. _IncludedRouter from Starlette >=1.3.1) when building version routes.

Fixes #30
Closes #30

exception_handlers passed to VersionedFastAPI via **kwargs were not
being passed to the versioned sub-apps, causing custom exception
handlers to fail with "Caught handled exception, but response already
started."

Also filter out non-APIRoute entries (e.g. _IncludedRouter from
Starlette >=1.3.1) when building version routes.

Fixes DeanWay#30
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.

Bug for exception handler

1 participant