Skip to content

Custom field search returns random results even when field is not searchable #69

Description

@rahulrkr08

Description

When searching customers using a custom field that is not searchable, the API returns unrelated results instead of an empty list.

Steps to Reproduce

  • Create a custom field for the customer resource, e.g. cf_ref_id.
  • Ensure this field is not searchable in the Chargebee configuration.
  • Do not assign any values to this field for any customers.

Run the following code:

this.chargebee.customer
.list({ limit: 1 })
.param({ 'cf_ref_id': '123' })
.request((error, result) => {
console.log("result", result);
});

Actual Behavior

The API returns the first customer in the list (limited to 1), even though there is no customer with cf_ref_id = '123' and the field is not searchable.

Expected Behavior

The API should return an empty result since, the field is not searchable and no customer has a value for cf_ref_id.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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