Skip to content

[v24.0.x] CRM create Import API throws "body.getHeaders is not a function" error #696

Description

@nignucial

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

  1. Install hubspot-api-nodejs v24.0.x

  2. 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

  1. 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

  • 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

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