Hi team,
I recently noticed that the client method in Freshservice is not working as expected!
I tried to make an API request and chained then and catch methods and every time the catch block got executed with error status code as 404 and yet the endpoint did its job.
client.request.delete(url , options).then(()=>{
// never went here event if the endpoint works!
}).catch((err)=>{
console.log(err)
});
Then I tried it with the try-catch block and everything got executed as expected.
try{
await client.request.delete(url , options)
}catch(err){
console.log(err)
}
Please let me know what’s happening? I am missing anything?
Thanks in advance