mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
Make admission errors clearer
This commit is contained in:
parent
9f60f3ce44
commit
87f84974d3
@ -34,7 +34,7 @@ func NewForbidden(a Attributes, internalError error) error {
|
|||||||
if obj != nil {
|
if obj != nil {
|
||||||
objectMeta, err := api.ObjectMetaFor(obj)
|
objectMeta, err := api.ObjectMetaFor(obj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return apierrors.NewForbidden(kind, name, err)
|
return apierrors.NewForbidden(kind, name, internalError)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is necessary because name object name generation has not occurred yet
|
// this is necessary because name object name generation has not occurred yet
|
||||||
|
Loading…
Reference in New Issue
Block a user