PricingBlog

Where should I put 'on success/on error, exactly (when there's multiple options)

  • rscott-1198368844201349180

    Bishop

    2 years ago

    I have this on a Form, which makes sense.

    But both the API and this Event have their own 'on success', 'on error' for the api. In the API itself and on the Event.

    If the API errors, it seems like in order for the Form 'on error' to work, API would need to send back some sort of error code.

    I just wonder how you decide which of these to use at any given moment for setting for example the error message.

    And how to send back an error signal so that it gets triggered here as an error as well (from API to Form)
    1198368844490748074-Screenshot_2024-01-20_at_2.46.56_PM.png