Extract error details from ApiException
v2When a
Tatrapayplus\TatrapayplusApiClient\ApiException is caught, you can use the following methods to retrieve diagnostic information about the failed request and the server's response:use Tatrapayplus\TatrapayplusApiClient\ApiException;
try {
$tatrapayplus_api->getAvailableMethods();
} catch (ApiException $e) {
$body = $e->getResponseBody(); // HTTP body of the server response (JSON or string)
$headers = $e->getResponseHeaders(); // HTTP response headers
$request = $e->getRequestBody(); // The HTTP request body that caused the exception
$errorObj = $e->getResponseObject(); // Deserialized response object of type \Tatrapayplus\TatrapayplusApiClient\Model\Model400ErrorBody
}