ApiTagNotFoundException.php 570 B

1234567891011121314151617181920212223242526272829303132
  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. }