Error handling for EnvHttpProxyAgent #4333
Unanswered
reynaldichernando
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I thought about using the address + port and checking the .env value if it is the proxy URL, but I'm not sure if this is the proper way. Also, right now, the proxy URL is using an IP, having it as a domain/hostname will resolve the proxy URL to an actual IP, and this logic will fail, since the error cause address won't match the one in the .env. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
I want to ask about properly handling error in the case of the proxy URL (via
HTTP_PROXY
orHTTPS_PROXY
) is unavailable.Right now, the error message only gives basic "fetch failed" with cause:
ECONNREFUSED
(I guess it also includes address and port).The reason I ask this because I want to discern between
ECONNREFUSED
when it is the target URL that is down or the proxy URL that is down.Some info on how to reproduce:
.env
(just have this set in the
.env
file, without any proxy running)index.js
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions