Skip to content

Commit

Permalink
Merge branch '1.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrandja committed Jun 30, 2023
2 parents 826c550 + 2a3b5d2 commit ec3d4fa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;

/**
Expand All @@ -44,7 +45,8 @@ public String handleError(Model model, HttpServletRequest request) {
}

private String getErrorMessage(HttpServletRequest request) {
return (String) request.getAttribute(RequestDispatcher.ERROR_MESSAGE);
String errorMessage = (String) request.getAttribute(RequestDispatcher.ERROR_MESSAGE);
return StringUtils.hasText(errorMessage) ? errorMessage : "";
}

}

0 comments on commit ec3d4fa

Please sign in to comment.