I'm trying to configure an email in Marketing Cloud with the ampscript function HttpGet in order to retrieve a coupon from an external system. I've seen that the HttpGet could return these values
- 0 indicates status is OK
- -1 indicates missing URL
- -2 indicates HTTP request error
- -3 indicates empty content - the function completed successfully but returned no content
How can i manage errors e.g. time-out of this external system? At the same time the system gives me a XML response, i would like to manage fallbacks if there are syntax code error; how can i validate XML response using Ampscript adding a fallback? Because i implemented the function BuildRowSetFromXML, but i didn't see anything used to handle this.
Do you have any suggestions?