@@ -55,8 +55,7 @@ error, and offer an actionable resolution to it.
5555
5656For pre-existing (brownfield) APIs which have previously returned errors
5757without machine-readable identifiers, the value of ` message ` ** must**
58- remain the same for any given error, as developers have previously had no
59- option but to use this for error handling. For more information, see
58+ remain the same for any given error. For more information, see
6059[ Changing Error Messages] ( #changing-error-messages ) .
6160
6261### Status.code
@@ -82,15 +81,9 @@ example, there **must not** be more than one [`BadRequest`][BadRequest]
8281message in the ` details ` , but there ** may** be a ` BadRequest ` and a
8382[ ` PreconditionFailure ` ] [ PreconditionFailure ] .
8483
85- Structured details with machine-readable identifiers ** must** be used so
86- that users can write code against specific aspects of the error. Error
87- message strings ** may** change over time; however, if an error message
88- does not have a machine-readable identifier * in addition to* the message,
89- changing the error message ** must** be considered a backwards-incompatible
90- change. For more information, see
91- [ Changing Error Messages] ( #changing-error-messages ) .
92-
93- All error responses ** must** include an ` ErrorInfo ` message within ` details ` .
84+ All error responses ** must** include an ` ErrorInfo ` within ` details ` . This
85+ provides machine-readable identifiers so that users can write code against
86+ specific aspects of the error.
9487
9588The following sections describe the most common standard detail payloads.
9689
@@ -430,7 +423,7 @@ change. This is one reason for introducing `LocalizedMessage` into the
430423
431424RPCs which have ** always** included ` ErrorInfo ` are in a better position:
432425the contract is then more about the stability of ` ErrorInfo ` for any given
433- error: the reason and domain need to be consistent over time, and the
426+ error. The reason and domain need to be consistent over time, and the
434427metadata provided for any given (reason,domain) can only be expanded.
435428It's still possible that clients could be parsing ` Status.message ` instead of
436429using ` ErrorInfo ` , but they will always have had a more robust option
@@ -444,6 +437,7 @@ available to them.
444437
445438## Changelog
446439
440+ - ** 2024-10-18** : Rewrite/restructure for clarity.
447441- ** 2024-01-10** : Incorporate guidance for writing effective messages.
448442- ** 2023-05-17** : Change the recommended language for ` Status.message ` to be
449443 the service's native language rather than English.
0 commit comments