EFL
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

NameTypeRequiredDescription
typestring|nullNoA URI reference that identifies the problem type.
titlestring|nullNoShort, human‑readable summary of the problem type.
statusint|nullNoHTTP status code applicable to this occurrence of the problem.
detailstring|nullNoHuman‑readable explanation specific to this occurrence.
instancestring|nullNoURI reference that identifies the specific occurrence of the problem.
additionalPropertiesarray<string,mixed>YesAny extra data returned by the API beyond standard RFC 7807 fields.

Methods

MethodKindReturn typeDescription
fromArray()staticProblemDetailsCreates 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).