mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-27 12:39:03 +00:00
Avoid NPE in error controller
This commit is contained in:
+1
-1
@@ -84,7 +84,7 @@ public class BasicErrorController implements ErrorController {
|
||||
}
|
||||
map.put("status", status);
|
||||
if (error != null) {
|
||||
while (error instanceof ServletException) {
|
||||
while (error instanceof ServletException && error.getCause() != null) {
|
||||
error = ((ServletException) error).getCause();
|
||||
}
|
||||
map.put("exception", error.getClass().getName());
|
||||
|
||||
Reference in New Issue
Block a user