Documentation ¶
Index ¶
Constants ¶
const ( // error message patterns used by parsers PatternECRBatchGetImageError = `denied: User: (.+) is not authorized to perform: ecr:BatchGetImage on resource` PatternImageDoesNotExistError = `denied: requested access to the resource is denied` PatternNetworkConfigurationError = `request canceled while waiting for connection` // internal errors ErrorMessageDoesNotMatch = `ErrorMessageDoesNotMatch` )
Variables ¶
This section is empty.
Functions ¶
func AugmentMessage ¶
Extend error messages with extra useful information. Tries to find known cases by matching `errMsg` against implemented parsers for known errors. If the error message pattern is unknown, returns the original error message.
Possible failure scenarios:
- Missing parser implementation - this can only occur if a new ErrorType was added incorrectly due to implementation oversight.
Currently, the function is set up in a safe manner - all failures are ignored, and the original error message string is returned.
func AugmentNamedErrMsg ¶
func AugmentNamedErrMsg(namedErr apierrors.NamedError) apierrors.NamedError
Extend error with extra useful information. Works with NamedErrors.
Types ¶
type AugmentableNamedError ¶
type AugmentableNamedError interface { apierrors.NamedError WithAugmentedErrorMessage(string) apierrors.NamedError }
An interface that provides means to reconstruct Named Errors. This is used during error message augmentation process.
type DockerError ¶
type DockerError struct { Type DockerErrorType RawError string }
type DockerErrorType ¶
type DockerErrorType int
DockerErrorType represents the type of error returned by Docker client.
const ( MissingECRBatchGetImageError DockerErrorType = iota ECRImageDoesNotExistError NetworkConfigurationError )
type ErrorMessageFunc ¶
type ErrorMessageFunc func(errorData DockerError) string
Defines the function signature for generating formatted error messages.