I am trying to error Handle my Cloud page in SFMC.
If anything goes wrong in the Ampscript Block, user should be redirected to an error page. There is a success scenario where I redirect the user to Success page within Ampscript.
I have tried using a mix of SSJS and AmpScript. Here is a Sample code. Is there a way of doing a redirect through SSJS directly instead of using a mix of SSJS and AMPScript
Issue with this code is if I comment out the Success Redirection, it works. If I put both redirects, it goes to the catch block every time