File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ func NewInvalidContextResolutionError(msg string) ResolutionError {
103103 }
104104}
105105
106+ // NewProviderFatalResolutionError constructs a resolution error with code PROVIDER_FATAL
107+ //
108+ // Explanation - The provider is in an irrecoverable error state.
109+ func NewProviderFatalResolutionError (msg string ) ResolutionError {
110+ return ResolutionError {
111+ code : ProviderFatalCode ,
112+ message : msg ,
113+ }
114+ }
115+
106116// NewGeneralResolutionError constructs a resolution error with code GENERAL
107117//
108118// Explanation - The error was for a reason not enumerated above.
@@ -142,7 +152,7 @@ func (e *ProviderInitError) Error() string {
142152//nolint:staticcheck // Renaming these would be a breaking change
143153var (
144154 // ProviderNotReadyError signifies that an operation failed because the provider is in a NOT_READY state.
145- ProviderNotReadyError = errors . New ("provider not yet initialized" )
155+ ProviderNotReadyError = NewProviderNotReadyResolutionError ("provider not yet initialized" )
146156 // ProviderFatalError signifies that an operation failed because the provider is in a FATAL state.
147- ProviderFatalError = errors . New ("provider is in an irrecoverable error state" )
157+ ProviderFatalError = NewProviderFatalResolutionError ("provider is in an irrecoverable error state" )
148158)
You can’t perform that action at this time.
0 commit comments