Documentation

MindeeHttpException extends MindeeException
in package

Exceptions relating to HTTP calls.

Handles uncaught error codes.

Table of Contents

Properties

$apiCode  : string|mixed|null
$apiDetails  : mixed|null
$apiMessage  : string|mixed|null
$statusCode  : int

Methods

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

Properties

$apiMessage

public string|mixed|null $apiMessage

API message field as sent by the server.

Methods

__construct()

public __construct(array<string|int, mixed> $httpError, string $url, int $code) : mixed
Parameters
$httpError : array<string|int, mixed>

Array containing the error data.

$url : string

Remote URL the error was found on.

$code : int

Error code.

createErrorObj()

Builds an appropriate error object from the server reply.

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

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|int, mixed>|string|bool $response) : MindeeHttpException
Parameters
$url : string

Remote URL the error was found on.

$response : array<string|int, mixed>|string|bool

Raw server response.

Return values
MindeeHttpException

        
On this page

Search results