|
|
@@ -44,8 +44,8 @@ class AppExceptionHandler extends ExceptionHandler
|
|
|
|
|
|
// 阻止异常冒泡
|
|
|
$this->stopPropagation();
|
|
|
- return $response->withHeader('Server', 'Hyperf')
|
|
|
- ->withHeader('charset','utf-8')
|
|
|
+ return $response->withHeader('Server', 'hcbet')
|
|
|
+ ->withHeader('Content-Type','application/json')
|
|
|
->withStatus(401)
|
|
|
->withBody(new SwooleStream($data));
|
|
|
}
|
|
|
@@ -53,7 +53,7 @@ class AppExceptionHandler extends ExceptionHandler
|
|
|
$this->logger->error(sprintf('%s[%s] in %s', $throwable->getMessage(), $throwable->getLine(), $throwable->getFile()));
|
|
|
$this->logger->error($throwable->getTraceAsString());
|
|
|
|
|
|
- return $response->withHeader('Server', 'Hyperf')->withStatus(500)->withBody(new SwooleStream('Internal Server Error.'));
|
|
|
+ return $response->withHeader('Server', 'hcbet')->withStatus(500)->withBody(new SwooleStream('Internal Server Error.'));
|
|
|
}
|
|
|
|
|
|
public function isValid(Throwable $throwable): bool
|