-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathExpectationFailedException.php
More file actions
28 lines (24 loc) · 946 Bytes
/
ExpectationFailedException.php
File metadata and controls
28 lines (24 loc) · 946 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
<?php
namespace Exceptions\Http\Client;
use Exceptions\Tag\InvalidDataTag;
/**
* The request could not be completed because the request specified an "Expect" request header that the server cannot
* fulfill.
*
* 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 ExpectationFailedException extends ClientErrorException implements InvalidDataTag
{
/**
* Returns the HTTP error code for that exception.
*/
public const HTTP_CODE = 417;
/**
* Returns the HTTP error message for that exception.
*/
public const HTTP_MESSAGE = 'Expectation Failed: The request cannot be completed because the request you are making contains an Expect header that the server cannot fulfill.';
}