move other errors to utils package

This commit is contained in:
Nicola Murino
2021-06-19 13:06:01 +02:00
parent f19937b715
commit c1b862394d
13 changed files with 79 additions and 73 deletions

View File

@@ -298,7 +298,7 @@ func TestShouldBind(t *testing.T) {
func TestGetRespStatus(t *testing.T) {
var err error
err = &dataprovider.MethodDisabledError{}
err = utils.NewMethodDisabledError("")
respStatus := getRespStatus(err)
assert.Equal(t, http.StatusForbidden, respStatus)
err = fmt.Errorf("generic error")