spring-web exception handling considers only the first cause of an exception to determine the applicable @ExceptionHandler. This patch makes the resolver search through the full exception hierarchy.

Comment From: rstoyanchev

Tentatively scheduling for 5.3 M1 as furthering the changes from #18863.

Comment From: rstoyanchev

Team Decision: The original support for only the first cause was to keep the resolution simpler as well out of caution (it was introduced in 4.3 with years of existing @ExceptionHandler). It didn't cause major issues and also trying to resolve causes one level at a time is still relatively simple, e.g. vs checking the entire chain. Another point is that given remote calls from a controller, how nested an exception is may well be outside an application's control. We'll go ahead with this in 5.3 M1.

Comment From: rstoyanchev

This has been merged.