Hello
I wrote a node function to use for custom authorization in my api gateway but when executing it in the OCI functions / integrations I am getting errors on the ‘.then’ of my fetches to the external URL. Below is a sample block that is throwing the error (know this works outside of the OCI function since can run the script standalone on my machine). Anyone have this working with node specifically for getting external JSON data?
Sample Code:
fetch(tokenDiscoveryURL, {
method: 'GET',
headers: {
'Accept': 'application/json',
'User-Agent': 'OCI API GW Runner'
}
})
.then(discoveryResponse => {
//this is needed to satisfy the promise only
logger("Returning the discovery response (promise 1");
return discoveryResponse.json();
})
.then(jsonDisRes => {
logger("Intro URL: " + jsonDisRes.introspection_endpoint);
logger("Going to introspect the token now");
Then, in the errors, I am getting the below from the logs…

Any help you can give would be appreciated.
Thanks
Nick