You are here

protected function HttpServiceApiWrapperBase::logError in HTTP Client Manager 8.2

Logs a command exception.

This method is meant to be overridden by any Service Api Wrapper. By default it prints the error message by using the Messenger service.

Parameters

\GuzzleHttp\Command\Exception\CommandException $e: The Command Exception object.

3 calls to HttpServiceApiWrapperBase::logError()
HttpServiceApiWrapperBase::call in src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperBase.php
Call REST web services.
HttpServiceApiWrapperBase::getCachedHttpConfigRequest in src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperBase.php
Get cached HTTP Config Request.
HttpServiceApiWrapperBase::httpConfigRequest in src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperBase.php
Executes an HTTP Config Request.

File

src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperBase.php, line 187

Class

HttpServiceApiWrapperBase
Class HttpServiceApiWrapperBase.

Namespace

Drupal\http_client_manager\Plugin\HttpServiceApiWrapper

Code

protected function logError(CommandException $e) {
  $this->messenger
    ->addError($e
    ->getMessage());
}