private function parseResult($response, $httpCode)
    {
        $result = json_decode($response, true);

        if (is_array($result)) {
            return $result;
        }

        throw new Exception('"' . $this->getLastJsonError() . '" in ' . $response, $httpCode);
    }