Skip to content

Commit 3536649

Browse files
committed
return status messages
1 parent 5eac146 commit 3536649

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

functions/event-reminders-daily/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,15 @@ const handler = async function (event, context) {
141141

142142
await postMessage(dailyMessage);
143143
}
144+
145+
return {
146+
statusCode: 200,
147+
};
144148
} catch (e) {
145149
console.error(e);
146-
return [];
150+
return {
151+
statusCode: 500,
152+
};
147153
}
148154
};
149155

functions/event-reminders-hourly/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,14 @@ const handler = async function (event, context) {
258258
// console.log(JSON.stringify(hourlyMessage, null, 2));
259259
}
260260
}
261+
return {
262+
statusCode: 200,
263+
};
261264
} catch (e) {
262265
console.error(e);
263-
return [];
266+
return {
267+
statusCode: 500,
268+
};
264269
}
265270
};
266271

functions/event-reminders-weekly/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ const handler = async function (event, context) {
133133

134134
await postMessage(weeklyMessage);
135135
}
136+
return {
137+
statusCode: 200,
138+
};
136139
} catch (e) {
137140
console.error(e);
138-
return [];
141+
return {
142+
statusCode: 500,
143+
};
139144
}
140145
};
141146

0 commit comments

Comments
 (0)