-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathGoneException.php
More file actions
30 lines (26 loc) · 1022 Bytes
/
GoneException.php
File metadata and controls
30 lines (26 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
namespace Exceptions\Http\Client;
use Exceptions\Tag\NotFoundTag;
/**
* The request could not be completed because the resource you are requesting is now gone. It might have been deleted
* or moved somewhere else.
*
* Consider using 404 instead of 410 unless you want to have a different code for soft deleted resources.
*
* Never throw an exception at the user, always catch it can synthesize it to a correct html response with
* appropriate headers. You can use the constants and accessor to get HTML values to return.
*
* @author Mathieu Dumoulin <thecrazycodr@gmail.com>
* @license MIT
*/
class GoneException extends ClientErrorException implements NotFoundTag
{
/**
* Returns the HTTP error code for that exception.
*/
public const HTTP_CODE = 410;
/**
* Returns the HTTP error message for that exception.
*/
public const HTTP_MESSAGE = 'Gone: The request cannot be completed because the resource you are requesting has been moved or has changed state.';
}