OutageException
extends ApiException
in package
Thrown when the RB API gateway itself reports being down, rather than rejecting the individual request. Raiffeisenbank's gateway signals this by returning HTTP 500 together with an `outage: yes` response header (seen on every endpoint, regardless of account/certificate/client) - distinct from a per-request 500 caused by bad input or a transient backend error. Extends ApiException (rather than plain \Exception) so that callers who already `catch (ApiException $exc)` around API calls catch this too, without needing a separate catch block, while still being able to catch this specifically to skip retries or surface a clearer "RB is down" message.
Table of Contents
Properties
- $responseBody : null|stdClass|string
- The HTTP body of the server response either as Json or string.
- $responseHeaders : null|array<string|int, array<string|int, string>>
- The HTTP header of the server response.
- $responseObject : Response|ModelInterface
- The deserialized response object.
Methods
- __construct() : mixed
- Constructor.
- getResponseBody() : null|stdClass|string
- Gets the HTTP body of the server response either as Json or string.
- getResponseHeaders() : null|array<string|int, array<string|int, string>>
- Gets the HTTP response header.
- getResponseObject() : mixed
- Gets the deserialized response object (during deserialization).
- isOutageResponse() : bool
- Detect the RB gateway's outage signal on a raw HTTP response: HTTP 500 with an `outage: yes` response header (header names are matched case-insensitively per PSR-7; the value is compared case-insensitively too, since it has been observed simply as `yes`).
- setResponseObject() : void
- Sets the deserialized response object (during deserialization).
Properties
$responseBody
The HTTP body of the server response either as Json or string.
protected
null|stdClass|string
$responseBody
$responseHeaders
The HTTP header of the server response.
protected
null|array<string|int, array<string|int, string>>
$responseHeaders
$responseObject
The deserialized response object.
protected
Response|ModelInterface
$responseObject
Methods
__construct()
Constructor.
public
__construct([mixed $message = '' ][, mixed $code = 500 ][, mixed $responseHeaders = [] ][, mixed $responseBody = null ]) : mixed
Parameters
- $message : mixed = ''
-
Error message
- $code : mixed = 500
-
HTTP status code
- $responseHeaders : mixed = []
-
HTTP response header
- $responseBody : mixed = null
-
HTTP decoded body of the server response either as \stdClass or string
getResponseBody()
Gets the HTTP body of the server response either as Json or string.
public
getResponseBody() : null|stdClass|string
Return values
null|stdClass|string —HTTP body of the server response either as \stdClass or string
getResponseHeaders()
Gets the HTTP response header.
public
getResponseHeaders() : null|array<string|int, array<string|int, string>>
Return values
null|array<string|int, array<string|int, string>> —HTTP response header
getResponseObject()
Gets the deserialized response object (during deserialization).
public
getResponseObject() : mixed
Return values
mixed —the deserialized response object
isOutageResponse()
Detect the RB gateway's outage signal on a raw HTTP response: HTTP 500 with an `outage: yes` response header (header names are matched case-insensitively per PSR-7; the value is compared case-insensitively too, since it has been observed simply as `yes`).
public
static isOutageResponse(ResponseInterface $response) : bool
Parameters
- $response : ResponseInterface
Return values
boolsetResponseObject()
Sets the deserialized response object (during deserialization).
public
setResponseObject(mixed $obj) : void
Parameters
- $obj : mixed
-
Deserialized response object