Custom errors and control error type of script steps
under review
P
Purple Mollusk
It would be really nice to be able to explicitly raise a specific type of error from a shell script, so that the script author can influence the failure strategy as a result of the script execution.
Even better, it would be really create to be able to create custom error types that can then branch rollback logic
It could be as simple as tying error types to specific shell script exit codes, and having a UI for creating error types where you can specify the exit code to associate with it
Log In
Rohan Gupta
under review
We are reviewing to see what is possible it won't be exactly as described in this feature request. It may be that we expose the error code as a variable and then you consume in another step to trigger failure.
Rohan Gupta
Merged in a post:
Failure Strategy Based On Error Code
Y
Yellow green Deer
We would like a method to specify how a failure should be handled based on the error code for the strategy. For example, we have a step which has a script and multiple failures. From those failures, different error codes would be generated. We would want Harness to have a method to react differently based on those failure error codes and employ different failure strategies based on those codes
T
Tangerine Chipmunk
This functionality is absolutely necessary. I use run steps for unsupported CLI tools and would like to utilize the tool-provided results in failure strategies
Z
Zinc white Peacock
I see a need for this functionality as well.
I have a case where it's not a custom shell script, but a built in Harness step (the Canary deploy step). There is a specific error returned I want to handle different from other errors. We should have the capability to handle each error as required.
Canny AI
Merged in a post:
Failure strategy based on exit codes
S
Spatial Bandicoot
It would be nice to define failure strategies based on the exit code of a step. This will allow developers to assign various exit codes to different failures, and help decide whether a failure is fatal vs retryable.
S
Silver Grasshopper
Would love this feature - for example I can set exit 8 in my script, and in the failure condition, only fail based on exit 8, if it's another exit code don't fail.
Rohan Gupta
Spatial Bandicoot these exit codes would only apply to your scripts and run steps correct? given Harness managed steps are already mapped to our out of the box failure strategies.
Rohan Gupta
rejected
Rohan Gupta
This is not feasible by our system at this time, we had gotten this request previously and we determined that with the current design its not feasible.