Redirect based on collection error

If a collection that is used in the page returns an error code, ie Unauthorized, I’d like to redirect to a standard error page.

How can I do this?

1 Like

I would do something like: On page load > run workflow:

your collection returns error:null if the request was fine. It returns error:object if request was not fine. From here, you can do a pre condition filter for the workflow:

If error != null (doesn’t equal") return true otherwise false

If true is returned, the workflow continues

next step is to redirect the user to error page.

you can use the above method in any workflow, not only on page load.

1 Like

@Edward you are on fire!

1 Like

Nice one @Edward :raised_hands: