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

Async exceptions not handled by error pages in war deployments #19471

Closed
chunlinyao opened this issue Dec 27, 2019 · 3 comments
Closed

Async exceptions not handled by error pages in war deployments #19471

chunlinyao opened this issue Dec 27, 2019 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@chunlinyao
Copy link

I am using spring-boot 2.1.7.RELEASE, and packaged it as war deployed in a Tomcat 8.5.45.

I have a async rest controller, when it take long time to process and throw a AsyncRequestTimeoutException, The client get a response with status == 200 and empty body.

When packaged as jar and run with embedded tomcat, I can get 503 error.

I debugged in and found ErrorPageFilter suppressed the status, and doesn't send any body to client.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 27, 2019
@bclozel bclozel changed the title ErrorPageFilter send status 200 with empty body when AsyncRequestTimeoutException Async exceptions not handled by error pages in war deployments Jan 3, 2020
@bclozel bclozel added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 3, 2020
@bclozel bclozel modified the milestones: 2.2.3, 2.2.x Jan 3, 2020
@bclozel
Copy link
Member

bclozel commented Jan 3, 2020

The ErrorPageFilter is not registered against the DispatcherType.ASYNC, which means that it's not called during the ASYNC dispatch and the error status is not set. We should update the ErrorPageFilterConfiguration to register with the correct DispatcherType enum set.

@wilkinsona
Copy link
Member

Re-opening to restore the ordering.

@wilkinsona
Copy link
Member

The ordering was restored in 115ea87.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants