Skip to content

Commit c366fd7

Browse files
committed
fix: handle empty payloads in scheduled task runs to prevent crash
1 parent bd41bb2 commit c366fd7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@ export class TestTaskPresenter {
382382

383383
async function getScheduleTaskRunPayload(payload: string, payloadType: string) {
384384
const packet = await parsePacket({ data: payload, dataType: payloadType });
385+
if (!packet) {
386+
return { success: false }; // handle packet undefined
387+
}
388+
385389
if (!packet.timezone) {
386390
packet.timezone = "UTC";
387391
}

0 commit comments

Comments
 (0)