aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api/exceptions
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-02-19 16:48:59 +0100
committerGitHub <noreply@github.com>2017-02-19 16:48:59 +0100
commitb9eb50c09947ec35838051e1bcfe5bc09a839f8e (patch)
tree514ddc5f97d12d5d0582f081cbdfc8a318aa9d17 /application/api/exceptions
parent65e56cbe49a7eb2a0cb09dda85daab3b921472ee (diff)
parent16e3d006e9e9386001881053f610657525feb188 (diff)
downloadShaarli-b9eb50c09947ec35838051e1bcfe5bc09a839f8e.tar.gz
Shaarli-b9eb50c09947ec35838051e1bcfe5bc09a839f8e.tar.zst
Shaarli-b9eb50c09947ec35838051e1bcfe5bc09a839f8e.zip
Merge pull request #728 from ArthurHoaro/api/getLink
REST API: implements getLink by ID service
Diffstat (limited to 'application/api/exceptions')
-rw-r--r--application/api/exceptions/ApiLinkNotFoundException.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/application/api/exceptions/ApiLinkNotFoundException.php b/application/api/exceptions/ApiLinkNotFoundException.php
new file mode 100644
index 00000000..de7e14f5
--- /dev/null
+++ b/application/api/exceptions/ApiLinkNotFoundException.php
@@ -0,0 +1,32 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5
6use Slim\Http\Response;
7
8/**
9 * Class ApiLinkNotFoundException
10 *
11 * Link selected by ID couldn't be found, results in a 404 error.
12 *
13 * @package Shaarli\Api\Exceptions
14 */
15class ApiLinkNotFoundException extends ApiException
16{
17 /**
18 * ApiLinkNotFoundException constructor.
19 */
20 public function __construct()
21 {
22 $this->message = 'Link not found';
23 }
24
25 /**
26 * {@inheritdoc}
27 */
28 public function getApiResponse()
29 {
30 return $this->buildApiResponse(404);
31 }
32}