Skip to content

Commit

Permalink
404 on schema not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Feb 14, 2018
1 parent bfea703 commit 69f36e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/schema/schema_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net/http"
"strings"

"github.com/rancher/norman/httperror"
"github.com/rancher/norman/store/empty"
"github.com/rancher/norman/types"
"github.com/rancher/norman/types/definition"
Expand Down Expand Up @@ -32,7 +33,7 @@ func (s *Store) ByID(apiContext *types.APIContext, schema *types.Schema, id stri
return schemaData, json.Unmarshal(data, &schemaData)
}
}
return nil, nil
return nil, httperror.NewAPIError(httperror.NotFound, "no such schema")
}

func (s *Store) modifyForAccessControl(context *types.APIContext, schema types.Schema) *types.Schema {
Expand Down

0 comments on commit 69f36e0

Please sign in to comment.