From 69f36e04a979a1f73564e907f54375969cb2fa95 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Wed, 14 Feb 2018 15:48:47 -0700 Subject: [PATCH] 404 on schema not found --- store/schema/schema_store.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store/schema/schema_store.go b/store/schema/schema_store.go index 6ba91c5f2..476d3cd28 100644 --- a/store/schema/schema_store.go +++ b/store/schema/schema_store.go @@ -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" @@ -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 {