Use eris for error management

This commit is contained in:
Jamie Curnow committed 2023-02-24 17:19:07 +10:00
1 parent 80315bd50e
commit c288886fd4
44 files changed
+173 -128

No files matched your search

@@ -6,6 +6,8 @@ import (
"npm/internal/database"
"npm/internal/types"
"github.com/rotisserie/eris"
)
const (
@@ -53,7 +55,7 @@ func (m *Model) Save() error {
var err error
if m.UpstreamID == 0 {
return fmt.Errorf("Upstream ID must be specified")
return eris.Errorf("Upstream ID must be specified")
}
if m.ID == 0 {