Skip to content

Commit

Permalink
debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mythilytm committed Nov 8, 2024
1 parent f098299 commit df0f090
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions functions/completeTaskAssignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ const closeTaskAssignment = async (
.tasks(event.taskSid)
.fetch();

console.log(`>>> Task Before: ${task.sid} attributes: ${JSON.stringify(task.attributes)}`);

await task.update({ attributes: event.finalTaskAttributes });

const completedTask = await task.update({ assignmentStatus: 'completed' });

console.log(
`>>> Task After completing: ${completedTask.sid} attributes: ${JSON.stringify(completedTask.attributes)}`,

Check failure on line 81 in functions/completeTaskAssignment.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `completedTask.attributes` with `⏎········completedTask.attributes,⏎······`
);

return { type: 'success', completedTask } as const;
} catch (err) {
return {
Expand Down Expand Up @@ -131,6 +137,8 @@ export const handler = TokenValidator(
finalTaskAttributes: JSON.stringify({}),
});

console.log('>>> closeTaskAssignment Result:', result);

resolve(success(result));
} catch (err: any) {
resolve(error500(err));
Expand Down

0 comments on commit df0f090

Please sign in to comment.