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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions