KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


2 posters

    REST Call Option to 'Output Page If Error' No Longer Available

    avatar
    bharr


    Posts : 2
    Points : 2278
    Join date : 2018-08-27

    REST Call Option to 'Output Page If Error' No Longer Available Empty REST Call Option to 'Output Page If Error' No Longer Available

    Post by bharr Fri Aug 02, 2019 11:05 pm

    An option to output an error message from Kapow 9.4 is no longer available in the recent versions. I'm trying to extract the response from a failed REST call so I can log the error. How can I get a 400, 500 error to actually display in the newer engines without that option? I 'Ignore Load Errors' but that still doesn't get the ouput response into the variable or browser.

    Can anyone provide help?
    batman
    batman


    Posts : 47
    Points : 2124
    Join date : 2019-03-19

    REST Call Option to 'Output Page If Error' No Longer Available Empty Re: REST Call Option to 'Output Page If Error' No Longer Available

    Post by batman Fri Aug 02, 2019 11:56 pm

    Hi,

    If the connection with the web service is successful then any error message returned by the service should be returned in the browser (provided your web service action is set to Output result as XML page)

    If there is a core issue with connecting to the service such as connectivity or authorisation then an error will be generated and needs to be handled in your workflow through the error handling options (add a try step before the call and set your error handling to route on the alternative path)

    Any error messages generated from the call can be retrieved through the Robot property -> Robot.executionErrors. On you alternative path add an assign variable step, choose expression for the assignment type then in the expression drop down you should see Robot Properties -> Robot.executionErrors. Assign this value to one of your variables and you should have the error message generated

    Hope this helps!

      Current date/time is Fri Nov 15, 2024 4:21 pm