Skip to content
Permalink
Browse files

Fix #186

  • Loading branch information...
JohnNiang committed Jun 7, 2019
1 parent 9849fe6 commit 3dc0a4ea39717dc94c418c425d27a2cc8ee0428a
@@ -27,7 +27,7 @@
*
* @author johnniang
*/
@RestControllerAdvice
@RestControllerAdvice({"run.halo.app.controller.admin.api", "run.halo.app.controller.content.api"})
@Slf4j
public class ControllerExceptionHandler {

@@ -53,11 +53,11 @@ public String handleError(HttpServletRequest request) {
if (StringUtils.startsWithIgnoreCase(throwable.getMessage(), "Could not resolve view with name '")) {
// TODO May cause unknown-reason problem
// if Ftl was not found then redirect to /404
return "redirect:/404";
return contentNotFround();
}
}

return statusCode == 500 ? "redirect:/500" : "redirect:/404";
return statusCode == 500 ? contentInternalError() : contentNotFround();
}

/**

0 comments on commit 3dc0a4e

Please sign in to comment.
You can’t perform that action at this time.