-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathError.php
50 lines (43 loc) · 989 Bytes
/
Error.php
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php declare(strict_types=1);
namespace MyENA\RGW;
/**
* Interface Error
* @package MyENA\RGW
*/
interface Error extends \JsonSerializable
{
/**
* Returns the code as it makes sense in the scope of the error.
*
* @return int
*/
public function getCode(): int;
/**
* Returns the raw response message. See individual implementor classes.
*
* @return string
*/
public function getReason(): string;
/**
* Must return true if this error was due to a transport layer issue
*
* @return bool
*/
public function isTransportError(): bool;
/**
* Must return true if transport succeeded, but request failed
*
* @return bool
*/
public function isApiError(): bool;
/**
* Must return true if response handling failed.
*
* @return bool
*/
public function isResponseError(): bool;
/**
* @return string
*/
public function __toString();
}