Error en la validacion de usuario

This commit is contained in:
2021-07-09 10:49:08 -04:00
parent 8d75beab0b
commit 6eba4aa52b
2 changed files with 24 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
<?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);
}
}