protected function buildQuery(array $queryParams = [])
    {
        $auth = [
            'appId' => $this->config['appId'],
            'appKey' => $this->config['appKey'],
        ];

        $queryParams = array_merge($auth, $queryParams);

        if (isset($queryParams['extendedOptions'])) {
            $extendedOptions = $queryParams['extendedOptions'];
        } else {
            $extendedOptions = [];
        }

        if (!is_array($extendedOptions)) {
            $extendedOptions = [$extendedOptions];
        }

        if ($this->config['use_http_errors'] &&
            !in_array('useHTTPErrors', $extendedOptions)
        ) {
            $extendedOptions[] = 'useHTTPErrors';
        }

        $queryParams['extendedOptions'] = implode('+', $extendedOptions);

        return $queryParams;
    }