You have created a task or job that contains multiple steps using If/Else conditions for flow control. You notice your job returns errors on running, but when drilling into the details you see that in fact the 'error' is that the 'if' test has evaluated as false. See the simplified example in the screenshot below:
ITMS 7.x - 8.1, Any job or task with an if/else condition evaluation
This is the current design of the product.
Engineering is working to correct this in a future version, currently targetted for 8.5. In future any evaluation whether 'true' or 'false' will be classifed as a successful step.