Hi,
Greetings!
today I encountered this below error
const body = {
freshdesk_webhook:{
ticket_id: ticketID,
ticket_tags: payloadTag,
ticket_status: payloadStatus,
ticket_priority: payloadPriority,
ticket_source: ticketData.source,
ticket_url: `https://${freshdeskSubdomain}.freshdesk.com/api/v2/tickets/${ticketID}`,
agent_email: agentEmail,
ticket_contact_sla_level: ticketData.custom_fields.sla_level
}
}
console.log(body)
console.log(new Date())
// return {status : 1 , data : body}
return new Promise((resolve) => {
try {
//logic
} catch (e) {
console.error(`Error while triggering webhook for #${ticketID}`);
console.log(e)
resolve({ status: 0, data: e });
}
});
Can someone please assist me here on why this is happening?
Thank you
