mirror of
https://github.com/rancher/norman.git
synced 2025-09-17 23:59:36 +00:00
Return 404 when no store is configured (not 200)
This commit is contained in:
@@ -3,6 +3,7 @@ package handler
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/rancher/norman/httperror"
|
||||
"github.com/rancher/norman/parse"
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
@@ -15,7 +16,7 @@ func ListHandler(request *types.APIContext, next types.RequestHandler) error {
|
||||
|
||||
store := request.Schema.Store
|
||||
if store == nil {
|
||||
return nil
|
||||
return httperror.NewAPIError(httperror.NotFound, "no store found")
|
||||
}
|
||||
|
||||
if request.ID == "" {
|
||||
|
Reference in New Issue
Block a user