It would be nice if specific errors had a specific error code to test against. Looking to test if a cluster already exists. A failure on omnictl get cluster ${CLUSTER_ID} might be because the cluster does not exist, or might be because omni could not be reached.
Solution
omnictl get cluster ${CLUSTER_ID} returns 0 if the cluster exists, perhaps 68 for omni being unreachable and 69 for the cluster not existing, based on a loose interpretation of sysexits? But really just unique.
Problem Description
It would be nice if specific errors had a specific error code to test against. Looking to test if a cluster already exists. A failure on
omnictl get cluster ${CLUSTER_ID}
might be because the cluster does not exist, or might be because omni could not be reached.Solution
omnictl get cluster ${CLUSTER_ID}
returns0
if the cluster exists, perhaps68
for omni being unreachable and69
for the cluster not existing, based on a loose interpretation of sysexits? But really just unique.Alternative Solutions
No response
Notes
No response