1 | <?php |
||
12 | class UnsuccessfulRequest extends TelegramTypes |
||
13 | { |
||
14 | /** |
||
15 | * Per definition, this will always be false, as this is an unsuccessful request |
||
16 | * @var bool |
||
17 | */ |
||
18 | public $ok = false; |
||
19 | |||
20 | /** |
||
21 | * An Integer ‘error_code’ field is returned, but its contents are subject to change in the future |
||
22 | * @var int |
||
23 | */ |
||
24 | public $error_code = 0; |
||
25 | |||
26 | /** |
||
27 | * In case of an unsuccessful request, ‘ok’ equals false and the error is explained in the ‘description’ |
||
28 | * @var string |
||
29 | */ |
||
30 | public $description = ''; |
||
31 | |||
32 | /** |
||
33 | * Some errors may also have an optional field ‘parameters’ of the type ResponseParameters, which can help to |
||
34 | * automatically handle the error |
||
35 | * |
||
36 | * @see ResponseParameters |
||
37 | * @var ResponseParameters |
||
38 | */ |
||
39 | public $parameters = null; |
||
40 | |||
41 | protected function mapSubObjects(string $key, array $data): TelegramTypes |
||
51 | } |
||
52 |