I am trying to add a participant to the activity using NodeJS PD Client.
Sometimes it works and sometimes it don’t. It’s random issue.
Can anyone tell me how to get detailed error response? Right now I am getting only this
PipeDrive API Issue: {“errorMessage”:“HTTP Response Not OK”,“errorCode”:500,“errorResponse”:"{\“success\”:false,\“error\”:\“Something went wrong with the request, please check your request and try again!\”,\“error_info\”:\“Please check developers.pipedrive.com for more information about Pipedrive API.\”,\“data\”:null,\“additional_data\”:null}"}
Is there any chance I can get exact error?
Thanks!!
Below is the code
try {
let activityPd = await lib.ActivitiesController.getDetailsOfAnActivity(body.meetingId,()=>{});
console.log(‘activity’);
console.log(activityPd.data);
body.participants.forEach(element => {
activityPd.data.participants.push(element);
});
console.log('after adding participant');
console.log({
id: activityPd.data.id,
participants: activityPd.data.participants
});
await lib.ActivitiesController.updateEditAnActivity({
id: activityPd.data.id,
participants: activityPd.data.participants
});
}
catch(e) {
Pino.error('PipeDrive API Issue: ', e);
throw new Error(‘PipeDrive API Issue:’, e);
}
I am getting participants from event and pushing in itno PD participants array and then calling the editActivity method.
Please help me.