Refactor host_repo -> domain errors (#786)

* Refactor domain errors: New -> E, create helper New and Wrap
* Update host repo to use domain errors
This commit is contained in:
Louis Ruch authored and GitHub committed 2020-12-09 10:11:38 -08:00
1 parent aa4157639c
commit ec0020de90
33 files changed
+996 -374

No files matched your search

+1 -3
View File
@@ -1,8 +1,6 @@
package static
import (
"fmt"
"github.com/hashicorp/boundary/internal/errors"
"github.com/hashicorp/boundary/internal/host/static/store"
"github.com/hashicorp/boundary/internal/oplog"
@@ -20,7 +18,7 @@ type HostSet struct {
// ignored.
func NewHostSet(catalogId string, opt ...Option) (*HostSet, error) {
if catalogId == "" {
return nil, fmt.Errorf("new: static host set: no catalog id: %w", errors.ErrInvalidParameter)
return nil, errors.New(errors.InvalidParameter, "static.NewHostSet", "no catalog id")
}
opts := getOpts(opt...)