Right place to handle runtime connection error to Connect-REST when used in Data Page
I have a data page using a Connect-REST rule to get some info from an external system. I'm having a problem today with the service being down for maintenance and the data page causing an ugly error whenever I try to call it.
I tried adding a simple PostLoadProcessing step to the data page but it doesn't seem to handle the runtime exception I'm getting from the Connect-REST. My question is ... where is this type of error best handled and in what way? Ideally I'd like to capture the fact it happened, write soemthing to a property and alert the user. Right now, the unhandled exception causes the screen to freeze up and I can't get anyone to get out of it nicely.
As far as the best place to handle Data Page error handling, would recommend to use the Response Data Transform. In the response Data Transform, as the very first step check for any errors in Data Page, you can use OOTB @baseclass.pxDataPageHasErrors as when condition and call another error handler Data Trasnform if it is true. You can save as the OOTB Data Transform @baseclass.pxErrorHandlingTemplate to implement a data page error handler data transform. In this one, you can customize your error handling logic as per your needs.
If you have already configured your Response Data Transform as described above and still does not work, please check if you have the HFIX0-10193 as described at
I've tried handling it in the data transform in a couple of ways but can't shake the error.
I'm using this in a Section. A property value is input to lookup data and when "changed" I call a Refresh. When the Refresh runs it executes a data transform. In the data transform I'm utilizing the value passed into the property as a key value in a data page lookup. The data page launches the Connect-REST to pull back information pertaining to the user.
I noted the error when (1) I don't pass a valid value to execute the lookup and (2) when the service is down.
I've tried heading it off in the data transform rules through your advice but I still haven't had any luck. Even trying to just "clear the errors from the page(s)" is still resulting in behavior when the calling page notes the Step failed. I'm thinking of instead wrapping it in an activity and trying to work some error handling magic in there, but of course I hate to use an activity if I don't need to.
pyWorkPage ends up with a Fail error in this case, and I can see the error starts on a data page created for the connection and propagates up.
If you've seen some setup where your error handling works, perhaps you could post a hierarchy of called rules and where you'd insert the capture and cleanup. Personally, I'd like to capture the error and post back to the user "hey, you entered bad data" without a window popping up saying "Fail" and stopping further processing.