diff --git a/Source/API/script/ExceptionHandle/TypeError.php b/Source/API/script/ExceptionHandle/TypeError.php deleted file mode 100644 index e69de29..0000000 diff --git a/Source/API/script/ExceptionHandle/TypeErrorMethod.php b/Source/API/script/ExceptionHandle/TypeErrorMethod.php index 09c27a2..11cf046 100644 --- a/Source/API/script/ExceptionHandle/TypeErrorMethod.php +++ b/Source/API/script/ExceptionHandle/TypeErrorMethod.php @@ -2,13 +2,18 @@ namespace ExceptionHandle; +use Psr\Http\Message\ServerRequestInterface; use Slim\Exception\HttpSpecializedException; +use Throwable; class TypeErrorMethod extends HttpSpecializedException { protected $code = 400; - protected $message = "Bad Parameters"; - protected string $title = "400 Bad Parameters"; - protected string $description = "The API need a 'method' query params in URL. Exemple :'http://url?method=getSomething'"; + protected $message = "Bad Parameters, The API need a 'method' query params in URL. Exemple :'http://url?method=getSomething'"; + + public function __construct(ServerRequestInterface $request,?Throwable $previous = null) + { + parent::__construct($request, $this->message, $previous); + } }