![]() |
yonezawa
February 22 |
Thanks for the info, but I wrote below, but it gave me an error.
‐‐‐‐‐‐‐‐‐‐
const{HttpsProxyAgent}= require('hpagent');
const client = platformClient.ApiClient.instance;
agent = new HttpsProxyAgent({
proxy: proxyUrl,
});
client.setProxyAgent(agent);
‐‐‐‐‐‐‐‐‐‐
I would like to know how to solve this problem.
‐‐‐‐‐‐‐‐‐
2025-02-22T15:45:44.795Z undefined ERROR Uncaught Exception {
"errorType": "Runtime.UserCodeSyntaxError",
"errorMessage": "SyntaxError: Identifier 'HttpsProxyAgent' has already been declared",
"stack": [
"Runtime.UserCodeSyntaxError: SyntaxError: Identifier 'HttpsProxyAgent' has already been declared",
" at _loadUserApp (file:///var/runtime/index.mjs:1084:17)",
" at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)",
" at async start (file:///var/runtime/index.mjs:1282:23)",
" at async file:///var/runtime/index.mjs:1288:1"
]
}
‐‐‐‐‐‐‐‐‐
Visit Topic to respond.
![]() |
Jerome.Saint-Marc
Genesys Employee
February 21 |
![]() |
Jerome.Saint-Marc
Genesys Employee
February 21 |
Hello,
const {HttpsProxyAgent} = require('hpagent')
const client = platformClient.ApiClient.instance;
agent = new HttpsProxyAgent({
proxy: proxyUrl,
});
client.setProxyAgent(agent)
new HttpsProxyAgent
and not new HttpProxyAgent
Regards,
![]() |
yonezawa
February 21 |
I am trying to create a function on AWS lambda to
retrieve GenesysCloud information.
However, I need to go through a proxy, and I am referring to the Using a Proxy (Node.js only) section of the following page as follows.
‐‐‐‐‐‐‐‐
const proxyUrl = process.env.HTTP_PROXY;
const client = platformClient.ApiClient.instance;
const agent = new HttpProxyAgent({
proxy: proxyUrl,
});
client.setProxyAgent(agent);
‐‐‐‐‐‐‐‐
I get the following error and do not know how to resolve it.
・TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
Visit Topic to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, click here.