diff --git a/api/app/Exceptions/Handler.php b/api/app/Exceptions/Handler.php index 89610dd..efc33bc 100644 --- a/api/app/Exceptions/Handler.php +++ b/api/app/Exceptions/Handler.php @@ -39,10 +39,7 @@ class Handler extends ExceptionHandler // }); $this->renderable(function (ValidationException $e) { - return response()->json([ - 'code' => ErrorCode('ARGS'), - 'error' => $e->errors()[0] ?? $e->getMessage() - ], $e->status); + return send_error($e->errors()[0] ?? $e->getMessage(), ErrorCode('ARGS')); }); } }