]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - application/api/exceptions/ApiLinkNotFoundException.php
de7e14f5c9cd16822bec865b5773a5d31ccc80d8
[github/shaarli/Shaarli.git] / application / api / exceptions / ApiLinkNotFoundException.php
1 <?php
2
3 namespace Shaarli\Api\Exceptions;
4
5
6 use 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 */
15 class 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 }