Documentation ¶
Index ¶
Constants ¶
View Source
const ( YAMLToJSONConversionError = "error converting YAML to JSON" ClusterUnreachableErrorMsg = "cluster unreachable" CrdPreconditionErrorMsg = "ensure crds are installed first" ArrayStringMismatchErrorMsg = "got array expected string" NotFoundErrorMsg = "not found" //this is a generic type constant, an error could be namespace "ns1" not found or service "ser1" not found. InvalidValueErrorMsg = "invalid value" OperationInProgressErrorMsg = "another operation (install/upgrade/rollback) is in progress" ForbiddenErrorMsg = "forbidden" )
list of error strings from Helm. These are part of the errors we check for presence in Helm's error messages.
View Source
const ( InternalClusterUnreachableErrorMsg = "cluster unreachable" InternalOperationInProgressErrorMsg = "another operation (install/upgrade/rollback) is in progress" )
list of internal errors, these errors are easy for the users to understand
Variables ¶
View Source
var DynamicErrorMapping = map[string]codes.Code{ NotFoundErrorMsg: codes.NotFound, ForbiddenErrorMsg: codes.PermissionDenied, InvalidValueErrorMsg: codes.InvalidArgument, ArrayStringMismatchErrorMsg: codes.InvalidArgument, CrdPreconditionErrorMsg: codes.FailedPrecondition, }
Functions ¶
func ConvertHelmErrorToInternalError ¶
ConvertHelmErrorToInternalError converts known error message from helm to internal error and also maps it with proper grpc code
func IsValidationError ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.