perf(exceptions.handler): 优化trace显示格式

This commit is contained in:
李东云
2023-01-14 02:16:37 +08:00
parent 990c247cf6
commit 9f9ff31a83

View File

@@ -153,7 +153,7 @@ class CommonHandler extends ExceptionHandler
}
$response = $response->withHeader(Header::CONTENT_TYPE, 'application/json; charset=utf-8');
if ($is_debug && $is_testing) {
$data['trace'] = ['errorType' => $error_type, 'errorTrack' => $throwable->getTrace()];
$data += ['errorType' => $error_type, 'errorTrack' => $throwable->getTrace()];
}
$cookies = json_encode($this->request->getCookieParams(), JSON_UNESCAPED_UNICODE);
$this->logger->error(