Client method is not working as expected! - jumps to catch block

Hi team,

I recently noticed that the client method in Freshservice is not working as expected!

image

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 :blush:

Hi Benny,

I have tried to reproduce this and it seems to work on my end.
Can you share the error you are logging? Also please make sure you add the domain of the URL to the whitelisted-domains in manifest.json.

Thanks.

Hi Asif,

Thanks for your patience.

I Have attached some of the screen-shots for your reference.

Please use the request-id to check and let us know the update ASAP.