Commit 5fc67c54 authored by Phillip Webb's avatar Phillip Webb

Work around Framework regression in handling of null model values

See https://github.com/spring-projects/spring-framework/issues/23038.
parent 8fe18303
...@@ -85,7 +85,8 @@ public class DefaultErrorAttributes implements ErrorAttributes { ...@@ -85,7 +85,8 @@ public class DefaultErrorAttributes implements ErrorAttributes {
HttpStatus errorStatus = determineHttpStatus(error); HttpStatus errorStatus = determineHttpStatus(error);
errorAttributes.put("status", errorStatus.value()); errorAttributes.put("status", errorStatus.value());
errorAttributes.put("error", errorStatus.getReasonPhrase()); 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); handleException(errorAttributes, determineException(error), includeStackTrace);
return errorAttributes; return errorAttributes;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment