I am trying to provide useful information as to why a workflow that connects to a REST endpoint using the HTTP plug-in may have failed. For example, if a server that I connect to goes down or the REST endpoint is not working, I can see in the output of the workflow log something similar to this:
(Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7f60b2008df0>: Failed to establish a new connection: [Errno 113] No route to host’))
I would like to be able terminate the workflow with a message back to the caller with something other than “oh snap, something broke.”
You have the option on each action to continue on failure. This allows the workflow to continue to the next step where you can have a decision step that decides what to do afterwards.
I am currently using the option to continue on failure so that I can check for a failure and add it to the output. What I am trying to see is if there is a way to get the error message from the plug-in output. For example, if the HTTP plug-in fails because it gets a message that a resource does not exist, I would like to include that in a message that is sent.
I have a workflow that creates tickets and when it fails to create a ticket, I add a generic message to an artifact that is then added to the loop output as an array. Once the loop finishes and exists, the step after then sends an email reporting what failed to have a ticket created and some of the people who receive the message do not have access to our instance of InsightConnect to look at the logs. I would like to be able to include some of the error message from the plug-in in the email.
I hope that makes sense. If not, i can try make it clearer.
I don’t think you’re going to get error messages from most plugins. The scripting plugins like Python and powershell do have the option to “Try” actions and output response codes/text to the workflow, but require a little more work.