Models
ProblemDetails
RFC 7807-compatible error details model used in API exceptions.
Namespace and purpose
Imoli\EflLeasingSdk\Model\Error\ProblemDetails represents structured error information following RFC 7807.
It is used by ApiException to expose details returned by the EFL API when an error occurs.
Class definition
- Namespace:
Imoli\EflLeasingSdk\Model\Error - Class: final
ProblemDetails
final class ProblemDetails
{
public ?string $type;
public ?string $title;
public ?int $status;
public ?string $detail;
public ?string $instance;
/** @var array<string, mixed> */
public array $additionalProperties;
public function __construct(array $data);
public static function fromArray(array $data): self;
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
type | string|null | No | A URI reference that identifies the problem type. |
title | string|null | No | Short, human‑readable summary of the problem type. |
status | int|null | No | HTTP status code applicable to this occurrence of the problem. |
detail | string|null | No | Human‑readable explanation specific to this occurrence. |
instance | string|null | No | URI reference that identifies the specific occurrence of the problem. |
additionalProperties | array<string,mixed> | Yes | Any extra data returned by the API beyond standard RFC 7807 fields. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
fromArray() | static | ProblemDetails | Creates a problem details instance from raw API data (convenience factory). |
The constructor extracts standard RFC 7807 fields (type, title, status, detail, instance) and keeps all additional keys in the additionalProperties array.
Usage in the SDK
- Available via
ApiException::getProblemDetails(). - Should be logged or inspected by your application when handling API errors.
- Combined with HTTP status code to decide on error handling strategies (e.g. retry vs. user-facing validation error).