Call httpRequest, get follow error,
{errno: -3001, code: 'EAI_AGAIN', syscall: 'getaddrinfo', hostname: 'kollect-api.team-mapa.space'}
This (may) happens only on server in Singapore region, I’ve tested same function call on Sanfransico, Bangalore region, but there were no problem.
My cloud function code looks like this:
Moralis.Cloud.define("requestTest", async (request) => {
const logger = Moralis.Cloud.getLogger();
return Moralis.Cloud.httpRequest({
type:"GET",
url: 'https://kollect-api.team-mapa.space/items/card_pack/10011015'
}).then(function(httpResponse) {
logger.info('Reply...' + JSON.stringify(httpResponse));
return httpResponse;
}, function(httpResponse) {
logger.error('Error...' + JSON.stringify(httpResponse));
return httpResponse;
});
})