]>
Commit | Line | Data |
---|---|---|
16e3d006 A |
1 | <?php |
2 | ||
3 | namespace Shaarli\Api\Exceptions; | |
4 | ||
16e3d006 A |
5 | use Slim\Http\Response; |
6 | ||
7 | /** | |
8 | * Class ApiLinkNotFoundException | |
9 | * | |
10 | * Link selected by ID couldn't be found, results in a 404 error. | |
11 | * | |
12 | * @package Shaarli\Api\Exceptions | |
13 | */ | |
14 | class ApiLinkNotFoundException extends ApiException | |
15 | { | |
16 | /** | |
17 | * ApiLinkNotFoundException constructor. | |
18 | */ | |
19 | public function __construct() | |
20 | { | |
21 | $this->message = 'Link not found'; | |
22 | } | |
23 | ||
24 | /** | |
25 | * {@inheritdoc} | |
26 | */ | |
27 | public function getApiResponse() | |
28 | { | |
29 | return $this->buildApiResponse(404); | |
30 | } | |
31 | } |