protected function dispatchRequest(Request $request): Collection
    {
        try {
            $response = $this->client->send($request);

            $this->response = $response;

            return $this->parseResponse($response);
        } catch (ClientException $exception) {

            $this->response = $exception->getResponse();

            if ($this->response->getStatusCode() === 404) {
                return new Collection;
            }

            throw $exception;
        }
    }
protected function dispatchRequest(Request $request): Collection
    {
        try {
            $response = $this->client->send($request);

            $this->response = $response;

            return $this->parseResponse($response);
        } catch (ClientException $exception) {

            $this->response = $exception->getResponse();

            if ($this->response->getStatusCode() === 404) {
                return new Collection;
            }

            throw $exception;
        }
    }
protected function dispatchRequest ( Request $ request ) : Collection { try { $ response = $ this -> client -> send ( $ request ) ; $ this -> response = $ response ; return $ this -> parseResponse ( $ response ) ; } catch ( ClientException $ exception ) { $ this -> response = $ exception -> getResponse ( ) ; if ( $ this -> response -> getStatusCode ( ) === 404 ) { return new Collection ; } throw $ exception ; } }
Dispatches a request and returns a response instance

@param Request $request
@return Collection
@throws GuzzleException
Dispatches a request and returns a response instance