Skip to content
← Back to activity

Public problem

customerio-node getCustomersByEmail returns 400 Bad Request (query params dropped)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Calling getCustomersByEmail("an email address") in customerio-node returns 400 Bad Request even with a valid email. Inspection shows the query parameters are dropped: the SDK issues GET /v1/customers instead of GET /v1/customers?email=an email address, so the API rejects the request. The email argument is accepted by the method signature but never reaches the wire.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

This was a library bug: getCustomersByEmail built the request without attaching the email as a query parameter. It was fixed and released in customerio-node v3.5.0. Upgrade to 3.5.0 or later and the request correctly hits /v1/customers?email=.... Source: https://github.com/customerio/customerio-node/issues/131

Source: https://github.com/customerio/customerio-node/issues/131