diff options
Diffstat (limited to 'application/api/exceptions/ApiTagNotFoundException.php')
-rw-r--r-- | application/api/exceptions/ApiTagNotFoundException.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/application/api/exceptions/ApiTagNotFoundException.php b/application/api/exceptions/ApiTagNotFoundException.php new file mode 100644 index 00000000..eee152fe --- /dev/null +++ b/application/api/exceptions/ApiTagNotFoundException.php | |||
@@ -0,0 +1,31 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Shaarli\Api\Exceptions; | ||
4 | |||
5 | use Slim\Http\Response; | ||
6 | |||
7 | /** | ||
8 | * Class ApiTagNotFoundException | ||
9 | * | ||
10 | * Tag selected by name couldn't be found in the datastore, results in a 404 error. | ||
11 | * | ||
12 | * @package Shaarli\Api\Exceptions | ||
13 | */ | ||
14 | class ApiTagNotFoundException extends ApiException | ||
15 | { | ||
16 | /** | ||
17 | * ApiLinkNotFoundException constructor. | ||
18 | */ | ||
19 | public function __construct() | ||
20 | { | ||
21 | $this->message = 'Tag not found'; | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * {@inheritdoc} | ||
26 | */ | ||
27 | public function getApiResponse() | ||
28 | { | ||
29 | return $this->buildApiResponse(404); | ||
30 | } | ||
31 | } | ||