Proper 404's for objects

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

No files matched your search

+2 -3
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
}