File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
spring-web/src/main/java/org/springframework/web/server Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ public String getReason() {
8787 }
8888
8989 @ Override
90- @ Nullable
9190 public String getMessage () {
92- String msg = "Response status " + this .status + (this .reason != null ? " with reason \" " + reason + "\" " : "" );
91+ String msg = "Response status " + this .status +
92+ (this .reason != null ? " with reason \" " + reason + "\" " : "" );
9393 return NestedExceptionUtils .buildMessage (msg , getCause ());
9494 }
9595
Original file line number Diff line number Diff line change @@ -35,14 +35,13 @@ public class ResponseStatusExceptionHandler implements WebExceptionHandler {
3535
3636 private static final Log logger = LogFactory .getLog (ResponseStatusExceptionHandler .class );
3737
38+
3839 @ Override
3940 public Mono <Void > handle (ServerWebExchange exchange , Throwable ex ) {
4041 if (ex instanceof ResponseStatusException ) {
4142 exchange .getResponse ().setStatusCode (((ResponseStatusException ) ex ).getStatus ());
42- if (ex .getMessage () != null ) {
43- logger .error (ex .getMessage ());
44- }
45- return Mono .empty ();
43+ logger .debug (ex .getMessage ());
44+ return exchange .getResponse ().setComplete ();
4645 }
4746 return Mono .error (ex );
4847 }
You can’t perform that action at this time.
0 commit comments