private function createCustomException(ClientException $exception): Exception
    {
        $errorId = '';
        $response = $exception->getResponse();
        if ($response) {
            $data = guzzle_json_decode((string) $response->getBody(), true);
            $errorId = (string) $data['sys']['id'] ?? '';
        }

        $exceptionClass = $this->getExceptionClass($errorId);

        return new $exceptionClass($exception);
    }