Summary
The CRM Import API throws a TypeError when called in version 24.0.x, regardless of whether parameters are provided or not. The error indicates that the code attempts to call body.getHeaders() on an object that does not have this method defined.
Steps to Reproduce
-
Install hubspot-api-nodejs v24.0.x
-
Use the CRM Create Import API (@hubspot/api-client/Client::crm.imports.coreApi.create) with either:
- Observe the error occurs in both scenarios
Expected Behavior
The CRM Import API should successfully process the import request and return the expected response without throwing an error.
Actual Behavior
The API call fails with the following error:
TypeError: body.getHeaders is not a function
Environment
Additional Context
Summary
The CRM Import API throws a TypeError when called in version 24.0.x, regardless of whether parameters are provided or not. The error indicates that the code attempts to call
body.getHeaders()on an object that does not have this method defined.Steps to Reproduce
Install hubspot-api-nodejs v24.0.x
Use the CRM Create Import API (@hubspot/api-client/Client::crm.imports.coreApi.create) with either:
Parameters passed to the import function, or
No parameters provided
Expected Behavior
The CRM Import API should successfully process the import request and return the expected response without throwing an error.
Actual Behavior
The API call fails with the following error:
Environment
Library Version: 24.0.1
Node.js Version: Cloudflare Workers
OS: MacOS 26.6
Additional Context
The error appears to be related to a missing method definition on the request body object
The issue occurs consistently regardless of parameter usage