Azure notification hub connection error
Islam, Mohmmad
0
Reputation points
Problem statement -
My working app stopped suddenly.
I am invoking a notification hub from NodeJS azure function that was working earlier but now it throws this error
{"errno":"ENOTFOUND","code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"myhub.servicebus.windows.net"}
using npm azure-sb - https://www.npmjs.com/package/azure-sb
var conString = "my hub connection string";
var notificationHubService = notHub.createNotificationHubService(
"myhub",
conString
);
var payload = {
data: {
message: 'Hello',
},
};
notificationHubService.gcm.send(null, payload, function (error) {
if (!error) {
console.log('notification sent');
}
else
{
console.log('Error while sending ! '+ JSON.stringify(error));
}
});
Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
383 questions
Sign in to answer