feat(ExceptionHandler): 修改异常处理以优化响应
This commit is contained in:
parent
bcf270583b
commit
4bc8092931
@ -20,9 +20,7 @@ class ExceptionHandler extends Handler
|
||||
{
|
||||
if ($exception instanceof Dumper) {
|
||||
return \response(self::convertToHtml($exception));
|
||||
} elseif ($exception instanceof ErrorException) {
|
||||
return response($exception->getMessage(), 401);
|
||||
} elseif ($exception instanceof BusinessException) {
|
||||
}elseif ($exception instanceof BusinessException) {
|
||||
return response($exception->getMessage());
|
||||
} elseif ($exception instanceof \Exception) {
|
||||
$isDebug = config('app.debug');
|
||||
|
2
app/common/cache/UserAccountSafeCache.php
vendored
2
app/common/cache/UserAccountSafeCache.php
vendored
@ -20,7 +20,7 @@ class UserAccountSafeCache extends BaseCache
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$ip = \request()->getLocalIp();
|
||||
$ip = \request()->getRealIp();
|
||||
$this->key = $this->tagName . $ip;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ return [
|
||||
'constructor' => [
|
||||
runtime_path() . '/logs/'.date('Ym').'/.log',
|
||||
2048,
|
||||
Monolog\Logger::NOTICE,
|
||||
Monolog\Logger::INFO,
|
||||
true,
|
||||
0755
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user