From 5fc67c545c7b7f6440bb0743feb15d5fc2c5d28a Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 28 May 2019 14:33:08 -0700 Subject: [PATCH] Work around Framework regression in handling of null model values See https://github.com/spring-projects/spring-framework/issues/23038. --- .../boot/web/reactive/error/DefaultErrorAttributes.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java index 47b99ced836..2e12136045f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java @@ -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; }