Skip to content

Commit

Permalink
Throw a few more debug lines at it and see what sticks (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
leet4tari authored Dec 18, 2023
2 parents 42445a4 + cd88baf commit 1bfdff8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routes/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ async function send(req, res, next) {
try {
for (const { token, sandbox } of tokenRows) {
const service = sandbox ? sandbox_push_notifications : push_notifications;
debug(`The send service is (sandbox=${sandbox})`);

const sendResult = await service.send(token.trim(), payload);
debug(`The sendResult of the notification service is ${sendResult}`);

if (sendResult[0].success) {
//Initial send a success, this is the result we'll use independent on whether or not reminders were scheduled successfully
success = true;
Expand All @@ -87,7 +91,7 @@ async function send(req, res, next) {
}
}
} catch (err) {
console.error(err);
console.error(`Error thrown from general try/catch ${err.message} : ${err}`);
success = false;
error = err;
}
Expand Down

0 comments on commit 1bfdff8

Please sign in to comment.