Proper 404's for objects

This commit is contained in:
Jamie Curnow
2023-02-27 17:21:40 +10:00
parent 83a9666807
commit 7455accf58
14 changed files with 149 additions and 81 deletions

View File

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