Skip to content

exportRules() throws ⚡️ Cannot read property '_jsonRequest' of undefined #660

Closed
@adrienjoly

Description

@adrienjoly

Do you want to request a feature or report a bug?

bug

What is the current behavior?

After loading https://cdn.jsdelivr.net/algoliasearch/3/algoliasearch.min.js (v3.24.9), the JavaScript code below throws TypeError: Cannot read property '_jsonRequest' of undefined

const fromClient = algoliasearch(fromAppId, fromApiKey);
const fromIndex = fromClient.initIndex(fromIdxName);
fromIndex.exportRules(100, console.log);

Tested on both nodejs (back-end) and in jsfiddle (front-end) with the same version.

I relied on the following documentation: https://www.algolia.com/doc/api-reference/api-methods/rules-export/?language=javascript#examples

What is the expected behavior?

I expected to have a list query rules printed to my javascript console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions