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

Raise exceptions that happened on mounted apps using BaseHTTPMiddleware #1452

Closed
wants to merge 4 commits into from

Conversation

Kludex
Copy link
Sponsor Member

@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
Sponsor Member 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