-
-
Notifications
You must be signed in to change notification settings - Fork 678
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
I get the following error
InvalidArgumentError: invalid throwOnError
at new Request (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/core/request.js:88:13)
at [dispatch] (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/dispatcher/client.js:299:21)
at Client.dispatch (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/dispatcher/dispatcher-base.js:153:29)
at [dispatch] (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/dispatcher/pool-base.js:157:28)
at Pool.dispatch (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/dispatcher/dispatcher-base.js:153:29)
at [dispatch] (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/dispatcher/agent.js:122:23)
at Agent.dispatch (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/dispatcher/dispatcher-base.js:153:29)
at Agent.request (/Users/kerollosmagdy/test-undici/node_modules/undici/lib/api/api-request.js:202:10)
at /Users/kerollosmagdy/test-undici/node_modules/undici/lib/api/api-request.js:193:15
at new Promise (<anonymous>) {
code: 'UND_ERR_INVALID_ARG'
}
Reproducible By
import {request} from 'undici'
console.log(await request('https://jsonplaceholder.typicode.com/todos/1', {
throwOnError: true
}))Expected Behavior
To work with no errors
Logs & Screenshots
Environment
- MacOs
- Node.js v22.18.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working