Legacy Dev Forum Posts

 View Only

Sign Up

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

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

    Posted 06-05-2025 18:45

    AkihikoSuzuki | 2023-11-27 08:09:21 UTC | #1

    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?


    DanielG1 | 2023-11-27 10:06:16 UTC | #2

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


    AkihikoSuzuki | 2023-11-28 00:30:00 UTC | #3

    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?


    Jerome.Saint-Marc | 2023-11-28 08:14:05 UTC | #4

    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,


    DanielG1 | 2023-11-28 08:17:01 UTC | #5

    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


    AkihikoSuzuki | 2023-11-28 08:58:52 UTC | #6

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


    system | 2023-12-29 08:59:34 UTC | #7

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


    This post was migrated from the old Developer Forum.

    ref: 23358