错误提示修改

parent b33c0f07
...@@ -37,8 +37,8 @@ public Task OnExceptionAsync(ExceptionContext context) ...@@ -37,8 +37,8 @@ public Task OnExceptionAsync(ExceptionContext context)
} }
else else
{ {
_logger.LogError($"接口异常:{context.Exception.ToString()}"); _logger.LogError($"接口异常:{context.Exception}");
var response = new ApiResponse(ResponseType.Error, "接口内部异常", context.Exception.Message); var response = new ApiResponse(ResponseType.Error, "服务器繁忙,请稍后再试...", context.Exception.Message);
context.Result = new ObjectResult(response); context.Result = new ObjectResult(response);
_logger.LogError("接口内部异常" + JsonHelper.Serialize(response)); _logger.LogError("接口内部异常" + JsonHelper.Serialize(response));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment