Skip to content

RequestError [HttpError]: Invalid response body while trying to fetch <API> Premature close #64200

Description

@JohannsisBaires

Version

22.23.0 and 24.17.0

Platform

Ubuntu
  24.04.4
  LTS

Github Action

Subsystem

No response

What steps will reproduce the bug?

When trying to fetch https://github.com/newrelic/serverless-newrelic-lambda-layers graphql API, it fails with

Error:
FetchError: Invalid response body while trying to fetch https://api.newrelic.com/graphql: Premature close
at Gunzip. (/home/runner/work//node_modules/node-fetch/lib/index.js:400:12)
at Gunzip.emit (node:events:521:24)
at Gunzip.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

How often does it reproduce? Is there a required condition?

Always, I'd guess fetching an API from the CI

What is the expected behavior? Why is that the expected behavior?

Successfully fetching the API

What do you see instead?

Error

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions