Skip to content

Fix thrown exception setup in ExceptionHandlingWebHandlerTests - #37233

Open
noojung wants to merge 1 commit into
spring-projects:mainfrom
noojung:fix-exception-handling-web-handler-tests
Open

Fix thrown exception setup in ExceptionHandlingWebHandlerTests#37233
noojung wants to merge 1 commit into
spring-projects:mainfrom
noojung:fix-exception-handling-web-handler-tests

Conversation

@noojung

@noojung noojung commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

handleErrorSignal() and thrownExceptionBecomesErrorSignal() previously had identical bodies, so both exercised the Mono.error() path.

StubWebHandler already had a raise flag to simulate a synchronously thrown exception, but no test enabled it.

Enable the flag in thrownExceptionBecomesErrorSignal() to cover the catch (Throwable) block in ExceptionHandlingWebHandler.

Configure StubWebHandler to throw instead of returning Mono.error().
This exercises the synchronous exception-to-error-signal conversion path.

Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 3, 2026
@bclozel bclozel added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants