Skip to content

Commit

Permalink
return status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltott committed Sep 8, 2022
1 parent 5eac146 commit 3536649
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 7 additions & 1 deletion functions/event-reminders-daily/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,15 @@ const handler = async function (event, context) {

await postMessage(dailyMessage);
}

return {
statusCode: 200,
};
} catch (e) {
console.error(e);
return [];
return {
statusCode: 500,
};
}
};

Expand Down
7 changes: 6 additions & 1 deletion functions/event-reminders-hourly/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,14 @@ const handler = async function (event, context) {
// console.log(JSON.stringify(hourlyMessage, null, 2));
}
}
return {
statusCode: 200,
};
} catch (e) {
console.error(e);
return [];
return {
statusCode: 500,
};
}
};

Expand Down
7 changes: 6 additions & 1 deletion functions/event-reminders-weekly/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,14 @@ const handler = async function (event, context) {

await postMessage(weeklyMessage);
}
return {
statusCode: 200,
};
} catch (e) {
console.error(e);
return [];
return {
statusCode: 500,
};
}
};

Expand Down

0 comments on commit 3536649

Please sign in to comment.