Skip to content

Commit

Permalink
fix error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed Dec 16, 2024
1 parent 93b1dde commit a8d4b84
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ export const handleEvent = async (
},
};
const response = await fetch(`${hrmBaseAccountUrl}/contacts`, options);
if (!response.ok) {
console.error(
`Failed to create HRM contact for task ${taskSid} - status: ${response.status} - ${response.statusText}`,
await response.text(),
);
return;
}
const { id }: HrmContact = await response.json();
console.info(`Created HRM contact with id ${id} for task ${taskSid}`);
};
Expand Down

0 comments on commit a8d4b84

Please sign in to comment.