Welcome to openkapow Sign in | Join
in Search
.

How to override bot errors

Last post 10-19-2008, 9:59 AM by Chris_C. 3 replies.
Sort Posts: Previous Next
  •  09-29-2008, 11:15 AM 21350

    How to override bot errors

    I am running into a situation where a bot thats invoked for json output returns a 502 error html page, when hit with an unexpected issue. I would like to see if there is any way of over riding default bot error to give error as json object?

    As our JS code is unable to process the 502 errors, we get stuck with a "waiting for response"

    Filed under:
  •  09-30-2008, 2:16 PM 21367 in reply to 21350

    Re: How to override bot errors

    If the robots generate an error the result will be an HTML page and not XML or JSON, so you have to parse the HTML in order to get the error message, i suggest using reqex.

    If you can identify the error inside the robot, you can handle it with the normal error handling, and the return an object that will be transformed into JSON, however since objects may have already been returned you will get both results and an error, so it may be better to just stop the robot when the error occurs (using the Stop step).

     

  •  10-04-2008, 1:54 PM 21415 in reply to 21367

    Re: How to override bot errors

    Handling expected errors within the robot has been taken care of, but due to the uncertainity about some sites loading issues, we get these html errors. Our javascript code invokes these REST bots directly using a callback function, and thus from client's PC, we expect a JSON output/error. I see it's a bug in web 2.0 robomaker/openkapow that for a default json output set for a bot, we still get these unexpected errors as HTML.

     I would like to know, if there is any way of completely overriding error messages and send our own versions.

  •  10-19-2008, 9:59 AM 21591 in reply to 21415

    Re: How to override bot errors

    There is a step in RoboMaker called ReportError where you can specify custom error messages.
View as RSS news feed in XML
.
Copyright 2006, 2007 KapowTech.com All Rights Reserved Company | Contact | Terms | Privacy