-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAPIError.php
More file actions
34 lines (31 loc) · 1.26 KB
/
APIError.php
File metadata and controls
34 lines (31 loc) · 1.26 KB
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
<?php
declare(strict_types=1);
namespace GetStream\GeneratedModels;
/**
*
*
* @property int $code
* @property string $duration
* @property string $message
* @property string $moreInfo
* @property int $statusCode
* @property array $details
* @property bool|null $unrecoverable
* @property array|null $exceptionFields
*/
class APIError extends BaseModel
{
public function __construct(
public ?int $code = null, // API error code
public ?string $duration = null, // Request duration
public ?string $message = null, // Message describing an error
public ?string $moreInfo = null, // URL with additional information
public ?int $statusCode = null, // Response HTTP status code
public ?array $details = null, // Additional error-specific information
public ?bool $unrecoverable = null, // Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it
public ?array $exceptionFields = null, // Additional error info
) {
}
// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}