Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
added new error for unknown manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Oct 10, 2019
1 parent c19dce6 commit e64b178
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ func (str MgrAssembleError) Error() string {
return fmt.Sprintf("MgrAssembleError: %q", string(str))
}

// Raised when the Mgr is not recognized
type MgrUnspecifiedError string

func (str MgrUnspecifiedError) Error() string {
return fmt.Sprintf("MgrUnspecifiedError: %q", string(str))
}

// Raised when credentials required to upload/deploy new package are missing.
type MgrDistCredentialsMissing string

Expand Down
2 changes: 1 addition & 1 deletion pkg/mgr/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func Detect(packageType string, pipelineData *pipeline.Data, config config.Inter
mgrType = "generic"

default:
return nil, errors.ScmUnspecifiedError(fmt.Sprintf("Unknown Manager for Package Manager (%s): %s", packageType, mgrType))
return nil, errors.MgrUnspecifiedError(fmt.Sprintf("Unknown Manager for Package Manager (%s): %s", packageType, mgrType))
}

return Create(mgrType, pipelineData, config, client )
Expand Down

0 comments on commit e64b178

Please sign in to comment.