ApiTagNotFoundException.php 569 B

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