Skip to content

validate does not work with undici >= 5.12 #9

@Dzieni

Description

@Dzieni
> await require('@stratokit/fetch-extra')('https://example.com', {timeout: 30000, retry: 1, validate: true}).then(r => r.text())
Uncaught TypeError: Found invalid object in transferList
    at structuredClone (node:internal/structured_clone:23:17)
    at cloneBody (/Users/michal/Projects/strato-agent/node_modules/.pnpm/undici@5.12.0/node_modules/undici/lib/fetch/body.js:260:21)
    at cloneResponse (/Users/michal/Projects/strato-agent/node_modules/.pnpm/undici@5.12.0/node_modules/undici/lib/fetch/response.js:346:24)
    at Response.clone (/Users/michal/Projects/strato-agent/node_modules/.pnpm/undici@5.12.0/node_modules/undici/lib/fetch/response.js:290:28)
    at fetch (/Users/michal/Projects/strato-agent/node_modules/.pnpm/github.com+StratoKit+fetch-extra@824d3381e3d44cad3_zb6buhrpkjh63xlguhkd2olchq/node_modules/@stratokit/fetch-extra/index.js:356:51)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async REPL1:1:33 {
  code: 'ERR_INVALID_TRANSFER_OBJECT',
  stats: {
    size: undefined,
    duration: 554.7955830097198,
    speed: 0,
    attempts: 1
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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