mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
2.0
This commit is contained in:
@@ -35,12 +35,8 @@ public class ZuulErrorController implements ErrorController {
|
||||
if (ctx.getResponse() == null) {
|
||||
ctx.setResponse(response);
|
||||
}
|
||||
ctx.setResponseStatusCode(HttpStatus.OK.value());
|
||||
Throwable throwable = ctx.getThrowable();
|
||||
if (throwable == null) {
|
||||
throwable = (Throwable) request.getAttribute("javax.servlet.error.exception");
|
||||
}
|
||||
log.error("zuul网关报错,URL:{}, params:{}",request.getRequestURL().toString(), ZuulContext.getApiParam(), throwable);
|
||||
log.error("请求错误,URL:{}, status:{}, params:{}",request.getRequestURL().toString(), ctx.getResponseStatusCode(), ZuulContext.getApiParam(), throwable);
|
||||
return this.buildResult(throwable);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user