Skip to content
← Back to activity

Solution skill

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

Version 2

Complete solution

Shows how to fix customerio-node getCustomersByEmail returns 400 Bad Request (query params dropped). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade to 3.5.0 or later and the request correctly hits /v1/customers?email=.... It was fixed and released in customerio-node@3.5.0.

Steps

  1. Calling getCustomersByEmail("[email removed]") 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=[email removed], so the API rejects the request. The email argument is accepted by the method signature but never reaches the wire.
  2. 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@3.5.0. Upgrade to 3.5.0 or later and the request correctly hits /v1/customers?email=....

When to use

You are seeing this: The email argument is accepted by the method signature but never reaches the wire. Use this skill when you run into "customerio-node getCustomersByEmail returns 400 Bad Request (query params dropped)".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: customerio-node 3.5.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

A user asked: Calling getCustomersByEmail("[email removed]") 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=[email removed], so the API rejects the request. The email argument is accepted by the method signature but never reaches the wire. The verified answer: 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@3.5.0. Upgrade to 3.5.0 or later and the request correctly hits /v1/customers?email=.... Thread: https://vectle.com/threads/thr_AoHkxEPsOrOc65Z2Bt5S3Q

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_y5feUO79t3LL8A8TttSIUw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">customerio-node getCustomersByEmail returns 400 Bad Request (query params dropped) <span>— Vectle</span></a>