Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUserFriendly ¶
IsUserFriendly returns true if err is marked as safe to present to failstep
Types ¶
type Error ¶
type Error struct { Source string `json:"source,omitempty"` ErrorCode ErrorType `json:"errorCode,omitempty"` Phase string `json:"phase,omitempty"` Reason string `json:"reason,omitempty"` Target string `json:"target,omitempty"` }
func (Error) UserFriendly ¶
type ErrorType ¶
type ErrorType string
const ( ErrorTypeNonUserFriendly ErrorType = "NON_USER_FRIENDLY_ERROR" ErrorTypeGeneric ErrorType = "GENERIC_ERROR" ErrorTypeChaosResultCRUD ErrorType = "CHAOS_RESULT_CRUD_ERROR" ErrorTypeStatusChecks ErrorType = "STATUS_CHECKS_ERROR" ErrorTypeTargetSelection ErrorType = "TARGET_SELECTION_ERROR" ErrorTypeExperimentAborted ErrorType = "EXPERIMENT_ABORTED" ErrorTypeHelper ErrorType = "HELPER_ERROR" ErrorTypeHelperPodFailed ErrorType = "HELPER_POD_FAILED_ERROR" ErrorTypeContainerRuntime ErrorType = "CONTAINER_RUNTIME_ERROR" ErrorTypeChaosInject ErrorType = "CHAOS_INJECT_ERROR" ErrorTypeChaosRevert ErrorType = "CHAOS_REVERT_ERROR" ErrorTypeK8sProbe ErrorType = "K8S_PROBE_ERROR" FailureTypeK8sProbe ErrorType = "K8S_PROBE_FAILURE" ErrorTypeCmdProbe ErrorType = "CMD_PROBE_ERROR" FailureTypeCmdProbe ErrorType = "CMD_PROBE_FAILURE" ErrorTypeHttpProbe ErrorType = "HTTP_PROBE_ERROR" FailureTypeHttpProbe ErrorType = "HTTP_PROBE_FAILURE" ErrorTypePromProbe ErrorType = "PROM_PROBE_ERROR" FailureTypePromProbe ErrorType = "PROM_PROBE_FAILURE" ErrorTypeTimeout ErrorType = "TIMEOUT" FailureTypeProbeTimeout ErrorType = "PROBE_TIMEOUT" )
func GetErrorType ¶
GetErrorType returns the type of error if the error is user-friendly
type PreserveError ¶
type PreserveError struct {
ErrString string
}
func (PreserveError) Error ¶
func (pe PreserveError) Error() string
func (PreserveError) ErrorType ¶
func (pe PreserveError) ErrorType() ErrorType
func (PreserveError) UserFriendly ¶
func (pe PreserveError) UserFriendly() bool
Click to show internal directories.
Click to hide internal directories.