# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\ApiException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Неожиданный код ошибки. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ApiException.md#method___construct) | | Constructor | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/ApiException.php](../../lib/Common/Exceptions/ApiException.php) * Package: YooKassa * Class Hierarchy: * [\Exception](\Exception) * \YooKassa\Common\Exceptions\ApiException --- ## Properties #### protected $responseBody : mixed --- **Type:** mixed **Details:** #### protected $responseHeaders : string[] --- **Type:** string[] **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = "", int $code, string[] $responseHeaders = array(), mixed $responseBody = null) : mixed ``` **Summary** Constructor **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | Error message | | int | code | HTTP status code | | string[] | responseHeaders | HTTP header | | mixed | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : mixed ```php public getResponseBody() : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** mixed - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 1](../reports/markers.md) * [Deprecated - 35](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-08-02 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoney