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.

Comment From: bclozel

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.

Comment From: wilkinsona

Re-opening to restore the ordering.

Comment From: wilkinsona

The ordering was restored in https://github.com/spring-projects/spring-boot/commit/115ea87b14e77d5251411b1b23cf549de5543956.