Skip to content

Commit f519d8b

Browse files
committed
Handle proxy config detection failures
1 parent 5957f30 commit f519d8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,12 @@ if (!amMainInstance) {
457457

458458
// Check we're happy using the default proxy settings: true if so, false if not.
459459
const proxyCheck = getSystemProxy()
460+
.catch((e) => {
461+
reportError(e);
462+
return undefined;
463+
})
460464
.then((proxyConfig) => {
461-
// If there's no proxy then the default settings are totally fine:
465+
// If there's no proxy then using the default settings is totally fine:
462466
if (!proxyConfig) return true;
463467

464468
// If the proxy is local, don't use it (this probably means HTTP Toolkit itself is the

0 commit comments

Comments
 (0)