Documentation

MindeeV1HttpException extends MindeeException
in package

Exceptions relating to HTTP calls.

Handles uncaught error codes.

Table of Contents

Properties

$apiCode  : string|null
$apiDetails  : string|array<string, int|float|string|bool|null|array<string|int, mixed>>|null
$apiMessage  : string|array<string, int|float|string|bool|null|array<string|int, mixed>>|null
$statusCode  : int

Methods

__construct()  : mixed
createErrorObj()  : array<string|int, string>
Builds an appropriate error object from the server reply.
handleError()  : self

Properties

$apiDetails

public string|array<string, int|float|string|bool|null|array<string|int, mixed>>|null $apiDetails

API details field as sent by the server.

$apiMessage

public string|array<string, int|float|string|bool|null|array<string|int, mixed>>|null $apiMessage

API message field as sent by the server.

Methods

__construct()

public __construct(array<string, int|float|string|bool|null|array<string|int, mixed>> $httpError, string $url, int $statusCode) : mixed
Parameters
$httpError : array<string, int|float|string|bool|null|array<string|int, mixed>>

Array containing the error data.

$url : string

Remote URL the error was found on.

$statusCode : int

Error code.

createErrorObj()

Builds an appropriate error object from the server reply.

public static createErrorObj(array<string, int|float|string|bool|null|array<string|int, mixed>>|string|null $response) : array<string|int, string>
Parameters
$response : array<string, int|float|string|bool|null|array<string|int, mixed>>|string|null

Parsed server response.

Tags
throws
MindeeException

Throws if the error itself can't be built.

Return values
array<string|int, string>

handleError()

public static handleError(string $url, array<string, mixed>|string|null $response) : self
Parameters
$url : string

Remote URL the error was found on.

$response : array<string, mixed>|string|null

Raw server response.

Return values
self
On this page

Search results