mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* Add test for get repository credentials Signed-off-by: Jan Graefen <[email protected]> * Log error on missing repository credentials Signed-off-by: Jan Graefen <[email protected]> * Fix import formatting Signed-off-by: Jan Graefen <[email protected]> * Use connection state instead of logging Just logging the error will be a bad user experience, since it provides no direct feedback as before. Signed-off-by: Jan Graefen <[email protected]> * Fix test to check for connection state Signed-off-by: Jan Graefen <[email protected]> * Do not expose technical message directly Instead of displaying a technical error message that might expose critical information about the cluster, we only display a generic error message. The actual error is then logged to the server logged, so that an administrator can further drill down into the problem Signed-off-by: Jan Graefen <[email protected]> * Adapt tests to new error message Signed-off-by: Jan Graefen <[email protected]> * Retrigger CI pipeline Signed-off-by: Jan Graefen <[email protected]> * See if I am actually the cause of this error Signed-off-by: Jan Graefen <[email protected]> * Revert changes to evaluate CodeQL result Signed-off-by: Jan Graefen <[email protected]> * Desperate attempt to find the cause of the CodeQL error Signed-off-by: Jan Graefen <[email protected]> * Revert "Desperate attempt to find the cause of the CodeQL error" This reverts commit a38ff650 Signed-off-by: Jan Graefen <[email protected]> * Fix first to review findings Signed-off-by: Jan Graefen <[email protected]> * Propose a better function name and add docu Signed-off-by: Jan Graefen <[email protected]> * Overwrite connection status for refresh as well Signed-off-by: Jan Graefen <[email protected]> * Fix goimports lint issue Signed-off-by: Jan Graefen <[email protected]>
21 lines
610 B
Go
21 lines
610 B
Go
package errors
|
|
|
|
type credentialsConfigurationError struct {
|
|
causingError error
|
|
}
|
|
|
|
func (err *credentialsConfigurationError) Error() string {
|
|
return err.causingError.Error()
|
|
}
|
|
|
|
// NewCredentialsConfigurationError wraps any error into a credentials configuration error.
|
|
func NewCredentialsConfigurationError(err error) error {
|
|
return &credentialsConfigurationError{causingError: err}
|
|
}
|
|
|
|
// IsCredentialsConfigurationError checks if the given error is a wrapped credentials configuration error.
|
|
func IsCredentialsConfigurationError(err error) bool {
|
|
_, ok := err.(*credentialsConfigurationError)
|
|
return ok
|
|
}
|