protected function createPromiseForRequest(RequestInterface $request, bool $processApiException): PromiseInterface
    {
        $clientRequest = $this->createClientRequest($request);
        $promise = $this->guzzleClient->sendAsync($clientRequest);
        $promise = $promise->then(
            function (PsrResponseInterface $clientResponse) use ($request, $clientRequest): ResponseInterface {
                return $this->processResponse($request, $clientRequest, $clientResponse);
            },
            function (RequestException $exception): void {
                $this->processException($exception);
            }
        );

        if ($processApiException) {
            $promise = $promise->then(
                null,
                function (ApiClientException $exception) use ($request): ResponseInterface {
                    return $this->processApiClientException($exception, $request);
                }
            );
        }

        return $promise;
    }