Work around Framework regression in handling of null model values

See https://github.com/spring-projects/spring-framework/issues/23038.
This commit is contained in:
Phillip Webb 2019-05-28 14:33:08 -07:00
parent 8fe18303cc
commit 5fc67c545c
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,8 @@ public class DefaultErrorAttributes implements ErrorAttributes {
HttpStatus errorStatus = determineHttpStatus(error);
errorAttributes.put("status", errorStatus.value());
errorAttributes.put("error", errorStatus.getReasonPhrase());
errorAttributes.put("message", determineMessage(error));
String message = determineMessage(error);
errorAttributes.put("message", message != null ? message : "");
handleException(errorAttributes, determineException(error), includeStackTrace);
return errorAttributes;
}