I am calling confluence API inside my Node API, it works fine on my localhost but when i host my node APIs on firebase it gives me error every time i hit the endpoint.
On localhost i am able to create page easily on confluence, and if i try to create same page again, then receiving proper error of "Page already created!".
Good.
When hosted on firebase i receive below error even if page is not yet created.
##error
"error": {
"errno": "EAI_AGAIN",
"errno": "EAI_AGAIN",
"code": "EAI_AGAIN",
"syscall": "getaddrinfo",
"hostname": "yapihew.atlassian.net",
"host": "yapihew.atlassian.net",
"port": 443
}#my code
app.get('/confluence/:title/:content',(req,res)=>{
//using params inside my bodyData
var bodyData = `some data with ${params} inside it`
var options = {
method: 'POST',
url: 'https://my-domain.atlassian.net/wiki/rest/api/content',
headers: {
'ContentType': 'application/json',
'Authorization': 'Basic <token>'
},
body: bodyData,
};
request(options).then(response =>{
//console.log("REsponse: "+response)
return res.send(response)
})
.catch((error) => {
//console.log('yahoo :'+error.message)
return res.send(error)
})
})