Skip to content

Commit

Permalink
Merge pull request #119154 from aimuz/fix-119152
Browse files Browse the repository at this point in the history
fix: Add "metav1.CauseType" to "field.ErrorType" map

Kubernetes-commit: 79c02ceb73f4d64f52a9d4c46785e4c7497493d9
  • Loading branch information
k8s-publishing-bot committed Jul 12, 2023
2 parents ddd0263 + 6d516fd commit c9b3b3a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/apis/meta/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,24 @@ const (
// CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules)
// values that can not be handled (e.g. an enumerated string).
CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported"
// CauseTypeForbidden is used to report valid (as per formatting rules)
// values which would be accepted under some conditions, but which are not
// permitted by the current conditions (such as security policy). See
// Forbidden().
CauseTypeForbidden CauseType = "FieldValueForbidden"
// CauseTypeTooLong is used to report that the given value is too long.
// This is similar to ErrorTypeInvalid, but the error will not include the
// too-long value. See TooLong().
CauseTypeTooLong CauseType = "FieldValueTooLong"
// CauseTypeTooMany is used to report "too many". This is used to
// report that a given list has too many items. This is similar to FieldValueTooLong,
// but the error indicates quantity instead of length.
CauseTypeTooMany CauseType = "FieldValueTooMany"
// CauseTypeInternal is used to report other errors that are not related
// to user input. See InternalError().
CauseTypeInternal CauseType = "InternalError"
// CauseTypeTypeInvalid is for the value did not match the schema type for that field
CauseTypeTypeInvalid CauseType = "FieldValueTypeInvalid"
// CauseTypeUnexpectedServerResponse is used to report when the server responded to the client
// without the expected return type. The presence of this cause indicates the error may be
// due to an intervening proxy or the server software malfunctioning.
Expand Down

0 comments on commit c9b3b3a

Please sign in to comment.