Removi las validaciones por ahora :/
This commit is contained in:
@@ -29,9 +29,15 @@ class Handler extends ExceptionHandler {
|
||||
return $rendered;
|
||||
}
|
||||
|
||||
if(config('app.debug') === false) {
|
||||
$message = $exception instanceof HttpException ? $exception->getMessage() : 'Server Error';
|
||||
} else {
|
||||
$message = $exception->getMessage();
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'error' => $rendered->getStatusCode(),
|
||||
'message' => $exception instanceof HttpException ? $exception->getMessage() : 'Server Error',
|
||||
'message' => $message,
|
||||
], $rendered->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidUuidException extends Exception {
|
||||
|
||||
protected $uuid;
|
||||
|
||||
public function __construct($uuid) {
|
||||
$this->uuid = $uuid;
|
||||
}
|
||||
|
||||
public function render($request) {
|
||||
return response()->json([
|
||||
'error' => 'invalid_uuid',
|
||||
'message' => 'El id ' . $this->uuid . ' no es un UUID valido'
|
||||
], 400);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user