Skip to content

Commit 6d516fd

Browse files
aimuzk8s-publishing-bot
authored andcommitted
fix: Add "metav1.CauseType" to "field.ErrorType" map
Signed-off-by: aimuz <[email protected]> Kubernetes-commit: bc059817dc5b1ccb672ca930687a262219e7e858
1 parent ddd0263 commit 6d516fd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pkg/apis/meta/v1/types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,24 @@ const (
995995
// CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules)
996996
// values that can not be handled (e.g. an enumerated string).
997997
CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported"
998+
// CauseTypeForbidden is used to report valid (as per formatting rules)
999+
// values which would be accepted under some conditions, but which are not
1000+
// permitted by the current conditions (such as security policy). See
1001+
// Forbidden().
1002+
CauseTypeForbidden CauseType = "FieldValueForbidden"
1003+
// CauseTypeTooLong is used to report that the given value is too long.
1004+
// This is similar to ErrorTypeInvalid, but the error will not include the
1005+
// too-long value. See TooLong().
1006+
CauseTypeTooLong CauseType = "FieldValueTooLong"
1007+
// CauseTypeTooMany is used to report "too many". This is used to
1008+
// report that a given list has too many items. This is similar to FieldValueTooLong,
1009+
// but the error indicates quantity instead of length.
1010+
CauseTypeTooMany CauseType = "FieldValueTooMany"
1011+
// CauseTypeInternal is used to report other errors that are not related
1012+
// to user input. See InternalError().
1013+
CauseTypeInternal CauseType = "InternalError"
1014+
// CauseTypeTypeInvalid is for the value did not match the schema type for that field
1015+
CauseTypeTypeInvalid CauseType = "FieldValueTypeInvalid"
9981016
// CauseTypeUnexpectedServerResponse is used to report when the server responded to the client
9991017
// without the expected return type. The presence of this cause indicates the error may be
10001018
// due to an intervening proxy or the server software malfunctioning.

0 commit comments

Comments
 (0)