Add a namespace for Exception, modify class name
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent df099c67a9
commit 51be7f9e0e

@ -1,12 +0,0 @@
<?php
use Slim\Exception\HttpSpecializedException;
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'";
}

@ -0,0 +1,14 @@
<?php
namespace ExceptionHandle;
use Slim\Exception\HttpSpecializedException;
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'";
}

@ -3,6 +3,7 @@
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use ExceptionHandle\TypeErrorMethod;
require 'Config/vendor/autoload.php';

Loading…
Cancel
Save