Skip to content

Commit 5fc67c5

Browse files
committed
Work around Framework regression in handling of null model values
See spring-projects/spring-framework#23038.
1 parent 8fe1830 commit 5fc67c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public Map<String, Object> getErrorAttributes(ServerRequest request,
8585
HttpStatus errorStatus = determineHttpStatus(error);
8686
errorAttributes.put("status", errorStatus.value());
8787
errorAttributes.put("error", errorStatus.getReasonPhrase());
88-
errorAttributes.put("message", determineMessage(error));
88+
String message = determineMessage(error);
89+
errorAttributes.put("message", message != null ? message : "");
8990
handleException(errorAttributes, determineException(error), includeStackTrace);
9091
return errorAttributes;
9192
}

0 commit comments

Comments
 (0)