-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Error: Request was cancelled" when using ProxyAgent #2161
Comments
PR welcome |
The cause message should probably not be |
Because this line replaces proper error with Line 437 in c415fbb
|
Hm. Then I don't know what we can do without violating the spec. @KhafraDev |
a possible solution is to add an optional cause to makeNetworkError |
or we could forward the error message (haven't looked into if we can do it), it doesn't have to be |
So, my pull request #2162 now can be merged? |
Bug Description
When using ProxyAgent and http proxy responds with status code !== 200, Undici throws "Error: Request was cancelled". This error message is confusing and irrelevant to problem cause.
This line throws error:
undici/lib/proxy-agent.js
Line 103 in c415fbb
Expected Behavior
Throwing error with meaningful error "Proxy response !== 200 when HTTP Tunneling".
Logs & Screenshots
Environment
Ubuntu 22.04.2 and Windows 11
Node.js 18.16.0
Undici v5.22.1
The text was updated successfully, but these errors were encountered: