Skip to content

Commit 256b435

Browse files
committed
Fixes #405
1 parent ce4d30f commit 256b435

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/invite/api/DefaultErrorController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.springframework.web.bind.annotation.RestController;
2121
import org.springframework.web.context.request.ServletWebRequest;
2222
import org.springframework.web.context.request.WebRequest;
23+
import org.springframework.web.servlet.resource.NoResourceFoundException;
2324

2425
import java.util.Map;
2526

@@ -56,7 +57,7 @@ public ResponseEntity<Map<String, Object>> error(HttpServletRequest request) {
5657
statusCode = result.containsKey("status") && (int) result.get("status") != 999 ?
5758
HttpStatus.valueOf((int) result.get("status")) : INTERNAL_SERVER_ERROR;
5859
} else {
59-
if (!(error instanceof NotFoundException)) {
60+
if (!(error instanceof NotFoundException || error instanceof NoResourceFoundException)) {
6061
boolean logStackTrace = !(error instanceof UserRestrictionException || error instanceof invite.exception.RemoteException);
6162
LOG.error(String.format("Error occurred; %s", error), logStackTrace ? error : null);
6263
}

0 commit comments

Comments
 (0)