Hello,
We are trying to call ticket api to catch the contact create event.This portion is working successfully.
But, when I give a wrong api key or invalid contact id to update in freshdesk, I am not getting any response.It is also not going to error block.I am testing this locally but hitting the actual api.
Please see the code below:
var options = { method: 'PUT',
url: freshdesk_url,
headers:
{'cache-control': 'no-cache',
authorization: "Basic " + util.getFreshdeskAPIKey(payload),
'content-type': 'application/json' },
body: {
"custom_fields": {
"contact_info_from_odoo":newString
},
},
json: true };
$request.put(freshdesk_url,options).then(
function(data) {
console.log(data);
})
, error => {
console.log('Request to Freshdesk failed' + JSON.stringify(error));
};
})