Add a new generic error that can indicate a server response was underspecified

Allows clients to distinguish between a server that returns us an error we
recognize, and errors that are generic HTTP (due to an intervening proxy)
This commit is contained in:
Clayton Coleman
2015-04-01 23:18:26 -04:00
parent 412a836bf7
commit 1233843a1d
2 changed files with 71 additions and 0 deletions

View File

@@ -1431,6 +1431,10 @@ 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"
// 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.
CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse"
)
// ObjectReference contains enough information to let you inspect or modify the referred object.