Use eris for error management

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

View File

@ -2,7 +2,8 @@ package dnsproviders
import (
"encoding/json"
"errors"
"github.com/rotisserie/eris"
)
// providerField should mimick jsonschema, so that
@ -111,5 +112,5 @@ func Get(provider string) (Provider, error) {
if item, found := all[provider]; found {
return item, nil
}
return Provider{}, errors.New("provider_not_found")
return Provider{}, eris.New("provider_not_found")
}