1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-16 07:09:44 +00:00

Subcontext and mapping updates

This commit is contained in:
Darren Shepherd
2017-11-21 13:46:30 -07:00
parent 3ba704aef1
commit 38c9c5c6c3
78 changed files with 1694 additions and 996 deletions

View File

@@ -12,7 +12,7 @@ func ErrorHandler(request *types.APIContext, err error) {
} else {
logrus.Errorf("Unknown error: %v", err)
error = &APIError{
code: SERVER_ERROR,
code: ServerError,
message: err.Error(),
}
}
@@ -23,7 +23,7 @@ func ErrorHandler(request *types.APIContext, err error) {
func toError(apiError *APIError) map[string]interface{} {
e := map[string]interface{}{
"type": "/v3/schema",
"type": "/v1-meta/schemas/error",
"code": apiError.code.code,
"message": apiError.message,
}