Skip to content

InvalidArgumentError: invalid transfer-encoding header when receiving a webhook from a provider #431

@btakita

Description

@btakita

Thank you for making this library & service available. I'm having an issue receiving a webhook from a host. It seems that the transfer-encoding header is not following the spec. However, it seems that the transfer-encoding headers may be valid for older specs of http...or has at least been used successfully in other contexts.

Re: smee-client, would it make sense to loosen the requirement for the transfer-encoding header?

TypeError: fetch failed
at /tmp/bunx-1000-smee-client@latest/node_modules/undici/index.js:127:13
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async #onmessage (file:///tmp/bunx-1000-smee-client@latest/node_modules/smee-client/index.js:63:30) {
[cause]: InvalidArgumentError: invalid transfer-encoding header
at processHeader (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/core/request.js:395:11)
at new Request (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/core/request.js:187:11)
at [dispatch] (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/client.js:304:21)
at Client.dispatch (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/dispatcher-base.js:152:29)
at [dispatch] (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/pool-base.js:157:28)
at Pool.dispatch (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/dispatcher-base.js:152:29)
at [dispatch] (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/agent.js:122:23)
at Agent.dispatch (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/dispatcher-base.js:152:29)
at [dispatch] (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js:46:18)
at EnvHttpProxyAgent.dispatch (/tmp/bunx-1000-smee-client@latest/node_modules/undici/lib/dispatcher/dispatcher-base.js:152:29) {
code: 'UND_ERR_INVALID_ARG'
}

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