@@ -47,11 +47,18 @@ error message **must** be considered a backwards-incompatible change.
4747** Note:** The [ ` ErrorInfo ` ] [ ErrorInfo ] message is the recommended way to send a
4848machine-readable identifier.
4949
50+ #### Uniqueness
51+
52+ Each type of detail payload ** must** be included at most once. For
53+ example, there ** must not** be more than one ` ErrorInfo ` message in the
54+ ` details ` field, but there ** may** be an ` ErrorInfo ` and a
55+ [ ` PreconditionFailure ` ] [ PreconditionFailure ] .
56+
5057### Localization
5158
5259Error messages ** must** be in English. If a localized error message is also
5360required, the service ** should** use [ ` google.rpc.LocalizedMessage ` ] [ details ]
54- as the ` details ` field.
61+ in the ` details ` field.
5562
5663### Partial errors
5764
@@ -86,6 +93,7 @@ does not exist, the service **must** error with `NOT_FOUND` (HTTP 404).
8693
8794## Changelog
8895
96+ - ** 2023-05-04** : Require uniqueness by message type for error details.
8997- ** 2022-11-04** : Added guidance around PERMISSION_DENIED errors previously
9098 found in other AIPs.
9199- ** 2022-08-12** : Reworded/Simplified intro to add clarity to the intent.
@@ -98,7 +106,8 @@ does not exist, the service **must** error with `NOT_FOUND` (HTTP 404).
98106<!-- prettier-ignore-start -->
99107[ aip-4221 ] : ../client-libraries/4221.md
100108[ details ] : https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto
101- [ ErrorInfo ] : https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto#L51
109+ [ ErrorInfo ] : https://github.com/googleapis/googleapis/blob/6f3fcc058ff29989f6d3a71557a44b5e81b897bd/google/rpc/error_details.proto#L27-L76
110+ [ PreconditionFailure ] : https://github.com/googleapis/googleapis/blob/6f3fcc058ff29989f6d3a71557a44b5e81b897bd/google/rpc/error_details.proto#L139-L166
102111[ grpc status code documentation ] : https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
103112[ Code ] : https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
104113[ Status ] : https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
0 commit comments