Is there a way not to alert me on errors in data actions?

What I am doing
The script is invoking a data action.
In the data action, the following API is executed to retrieve contact list information.
/api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}

What I am having trouble with
If there is an incoming call from a non-existent contactId, the data action will return a 404 error, and the data action error will be alerted on the screen.

I'd like to control it so that I don't get alerted when an error occurs in this data action, but I haven't found a way to do it.
Is there any way?

Just put the data action request inside a try catch function. I did the same and it worked for me.
best regards

Thanks for letting me know.
I tried it, but when I write a try catch in the request JSON, I get a syntax error.
Can you tell me the specific method?

Hello,

Daniel was referring to a Try/Catch to be used in your Script - NOT in the Data Action configuration.

You need to add a custom action in your Script.
When you define this custom action, you can leverage a Try/On Error expression. Inside the Try, you will invoke the Data Action ("Execute Data Action"), and manage the error in the On Error.

Regards,

1 Like

Jerome is right. I was talking about script. Script supports try catch syntax. All you need to do is call function between try catch function.

Best regards

1 Like

Thank you for the detailed explanation.
we were able to solve the problem quickly.
Thank you Daniel and Jerome.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.