-
-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
When proxy designated in upstreamProxyUrl is unreachable for whatever reason - process dies instead of throwing error.
How to reproduce:
const SecretAgent = require('secret-agent');
(async () => {
try {
const agent = await new SecretAgent({
showReplay: false,
upstreamProxyUrl: 'http://127.0.0.1:65535'
});
await agent.goto('http://api.ipify.org/');
}
catch(err) {
console.error(`Error: ${err}`)
}
})();
Expected Behavior
Catchable error?
Current Behavior
Getting a couple of errors in the console log.
ts-node ./src/_playground.ts
2020-12-04T10:53:48.829Z ERROR [@secret-agent/core/index] UnhandledErrorOrRejection {
clientError: '2020/12/04 13:53:48 Dial (proxy/remote) Error: dial tcp 127.0.0.1:65535: connect: connection refused',
context: {}
}
2020-12-04T10:53:48.831Z ERROR [@secret-agent/core/index] UnhandledErrorOrRejection {
clientError: "TypeError: Cannot create property 'stack' on string '2020/12/04 13:53:48 Dial (proxy/remote) Error: dial tcp 127.0.0.1:65535: connect: connection refused'",
context: {}
}
Context
SecretAgent version: 1.2.0-alpha.2
ts-node: v9.1.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels