mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-09 22:45:37 +08:00
调整使用公共返回方法
This commit is contained in:
parent
61ff24e723
commit
106f65feb1
@ -39,7 +39,7 @@ class Handler extends ExceptionHandler
|
||||
//
|
||||
});
|
||||
$this->renderable(function (ValidationException $e) {
|
||||
return send_error($e->errors()[0] ?? $e->getMessage(), ErrorCode('ARGS'));
|
||||
return send_error($e->errors()[array_key_first($e->errors())][0] ?? $e->getMessage(), ErrorCode('ARGS'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user