diff options
author | Arthur <arthur@hoa.ro> | 2016-12-20 11:30:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-20 11:30:05 +0100 |
commit | 80677a23e2e10d78bc527e9754286787b453ce61 (patch) | |
tree | 18feefc47f389171f3886b191fb14f2ace6d0175 /application/api/exceptions/ApiBadParametersException.php | |
parent | e350aa750f9e9e742bb60a1e04ebd9e21f763c78 (diff) | |
parent | 18e6796726d73d7dc90ecdd16c181493941f5487 (diff) | |
download | Shaarli-80677a23e2e10d78bc527e9754286787b453ce61.tar.gz Shaarli-80677a23e2e10d78bc527e9754286787b453ce61.tar.zst Shaarli-80677a23e2e10d78bc527e9754286787b453ce61.zip |
Merge pull request #666 from ArthurHoaro/slim-api
REST API structure using Slim framework
Diffstat (limited to 'application/api/exceptions/ApiBadParametersException.php')
-rw-r--r-- | application/api/exceptions/ApiBadParametersException.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/application/api/exceptions/ApiBadParametersException.php b/application/api/exceptions/ApiBadParametersException.php new file mode 100644 index 00000000..e5cc19ea --- /dev/null +++ b/application/api/exceptions/ApiBadParametersException.php | |||
@@ -0,0 +1,19 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Shaarli\Api\Exceptions; | ||
4 | |||
5 | /** | ||
6 | * Class ApiBadParametersException | ||
7 | * | ||
8 | * Invalid request exception, return a 400 HTTP code. | ||
9 | */ | ||
10 | class ApiBadParametersException extends ApiException | ||
11 | { | ||
12 | /** | ||
13 | * {@inheritdoc} | ||
14 | */ | ||
15 | public function getApiResponse() | ||
16 | { | ||
17 | return $this->buildApiResponse(400); | ||
18 | } | ||
19 | } | ||