How to fix warning while using intercept event

Hi Folks,

i am using below event,

var eventCallback = function (event) {
     checkActivityDB(client, event);
};"call.saveAndClose", eventCallback, { intercept: true });

in that event, on api call succes i am using i am using event.helper.done();
when i am using event.helper.done(), i am getting warning at that line Expected rejection to be handled. can you guys help me, how to fix this warning


Hello folks,

Is anyone can help me in this?

Thanks in advance,

Hi, @Tejasri_Kalluri!

I took a look to the code event.helper.done(), it returns nothing and expects no callback functions as parameters, so I guess that there’s nothing wrong with this code. Perhaps the folks from Fresh could say more about this. To give some context, why do you need to fix this warning? Is it leading to some problem?

1 Like

Hi @samuelpares,

I am working on market place requirement, at that line causing warning, while doing fdk validate


Can you use try catch or use .catch to ensure any error is handled.

hey, i have used try catch block,

actually i am getting warning at line,


also tried"call.saveAndClose", eventCallback, { intercept: true }); 

at this line catch block

and also used at that particular line(event.helper.done()) also try catch, not cleared warning :neutral_face:

1 Like

The warning is not a blocking issue. It won’t stop the app from being uploaded for review.