Skip to content

Raise exceptions that happened on mounted apps using BaseHTTPMiddleware#1452

Closed
Kludex wants to merge 4 commits intomasterfrom
fix/raise-in-mounted-routes
Closed

Raise exceptions that happened on mounted apps using BaseHTTPMiddleware#1452
Kludex wants to merge 4 commits intomasterfrom
fix/raise-in-mounted-routes

Conversation

@Kludex
Copy link
Copy Markdown
Owner

@Kludex Kludex commented Jan 30, 2022

Closes #1433

The problem here is that the mounted app is able to send http.response.start (and the following http.response.body), but we check if an exception happened only if there was an anyio.EndOfStream i.e. only if messages were not sent.

The solution here just raises the exception at the end of the middleware.

@Kludex Kludex changed the title Raise exceptions that happened on mounted apps using BaseHTTPMiddleware Raise exceptions that happened on mounted apps using BaseHTTPMiddleware Jan 30, 2022
@Kludex
Copy link
Copy Markdown
Owner Author

Kludex commented Jan 31, 2022

Replaced by #1459

@Kludex Kludex closed this Jan 31, 2022
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.

Raising Exceptions in sub-applications routes

2 participants