I used Node Sender API for the AeroGear Unified Push server for the 1.1.x series of the UnifiedPush Server. It can be found here. It sent fine. Client received fine. But the logs below did not occur at all.
Any suggestions?
agSender(settings).then((client) => {
client.sender.send(message, options).then((response) => {
console.log('send succeeded');
console.log('send notification success', response);
});
});
Edit: After update node.js on my Mac to the latest version, now there is this message in the console. It still works fine. But I do need the completion block to work so I can trigger another sequence of events.
(node:4202) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: UPS request returned status code: 202
Edit 2nd time: If I temporarily disable this code in sender.js, then the completion block gets called. What is status code 202?
// if (response.statusCode !== 200) {
// return reject(
// new Error(`UPS request returned status code: ${response.statusCode}`)
// );
// }