Intermittent "Premature close" / truncated responses from CRM v3 + v4 API (api.hubapi.com)

Since roughly June 19, 2026, ~14:00 UTC we have been seeing a steady rate of truncated responses from api(.)hubapi(.)com: the connection is closed before the
response body finishes streaming. Our Node client (node-fetch) surfaces it as:

FetchError: Invalid response body while trying to fetch api(.)hubapi(.)com/crm/v3/objects/…: Premature close
Since roughly June 19, 2026, ~14:00 UTC we have been seeing a steady rate of truncated responses from api(.)hubapi(.)com: the connection is closed before the
response body finishes streaming. Our Node client (node-fetch) surfaces it as:

FetchError: Invalid response body while trying to fetch api(.)hubapi(.)com/crm/v3/objects/…: Premature close
at Gunzip. (…/node-fetch/lib/index.js)

Key characteristics:

  • Intermittent, ~15-20% of requests. The exact same request usually succeeds on a retry.
  • Affects multiple CRM endpoints, reads and writes:
    • GET /crm/v3/objects/contacts/{id} (requesting a large property set)
    • POST /crm/v3/objects/{type}/search
    • GET /crm/v3/schemas/{type}
    • POST /crm/v4/associations/{from}/{to}/batch/read
    • POST /crm/v3/objects/notes
  • Larger responses fail more often (e.g. contact fetches that request a large property set fail far more than minimal requests).

Questions:

  1. Is anyone else seeing elevated truncated / prematurely-closed responses on the CRM API since around June 19?
  2. Is there a known edge or CRM-API degradation in this window?
  3. Beyond retry-with-backoff and reducing response size (fewer properties per request), is there anything HubSpot recommends to reduce these?

Thanks!

TLDR;
The issue is your node version

Issue

I was using node:lts-alpine for my deployments, which apparently got some updates and caused our HubSpot APIs to fail - the root cause was node-fetch

Temporary Solution:

This impacts our production workload, so I had to pin down an exact version of the node FROM node:24.16.0-alpine3.24 and patch this while I am working on a fix.

Long-term fix Solution:

Since the pinned version has a critical vulnerability, I am trying to figure out a permanent solution for our deployments.

@imjm Thanks for the pointer, I had the same issue, hard find!
For others, the official node issue is here: http: node-fetch throws ERR_STREAM_PREMATURE_CLOSE on keep-alive socket closures after latest security releases · Issue #63989 · nodejs/node · GitHub