small cleanup on pkg/config

This commit is contained in:
Tim Hockin 2014-11-21 05:41:57 +08:00
parent f24ea5ce59
commit d4c37e352e

View File

@ -78,7 +78,8 @@ func CreateObject(client *client.RESTClient, mapping *meta.RESTMapping, obj runt
// TODO: This should be using RESTHelper
err = client.Post().Path(mapping.Resource).Namespace(namespace).Body(obj).Do().Error()
if err != nil {
return &errs.ValidationError{errs.ValidationErrorTypeInvalid, name, err}
e := errs.NewFieldInvalid(name, err)
return &e
}
return nil