| 1 | <?php |
||
| 7 | class GraphQLException extends ApiException |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @const string Error key returned. |
||
| 11 | */ |
||
| 12 | const ERROR_KEY = 'errors'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array The decoded JSON response errors. |
||
| 16 | */ |
||
| 17 | protected $errors = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Creates a RESTfulException. |
||
| 21 | * |
||
| 22 | * @param Response $response The response that threw the exception. |
||
| 23 | */ |
||
| 24 | 1 | public function __construct(Response $response) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Return the JSON response errors. |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | 1 | public function getErrors() |
|
| 41 | } |
||
| 42 |