feat: update ErrorDetails to allow unpacking arbitrary messages#3073
Merged
BenWhitehead merged 1 commit intomainfrom Jul 29, 2024
Merged
feat: update ErrorDetails to allow unpacking arbitrary messages#3073BenWhitehead merged 1 commit intomainfrom
BenWhitehead merged 1 commit intomainfrom
Conversation
Because the google.rpc.Status.details is a google.protobuf.Any, it can contain any message. ErrorDetails conveniently unpacks the standard status message types from google/rpc/error_details.proto but some services provide their own error details types. This new method allows unpacking those custom messages without deserializing the entire google.rpc.Status another time.
|
|
blakeli0
approved these changes
Jul 29, 2024
Contributor
blakeli0
left a comment
There was a problem hiding this comment.
It makes sense, thanks Ben!
Contributor
Author
|
Thanks for the review @blakeli0 |
mpeddada1
pushed a commit
that referenced
this pull request
Aug 16, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>2.44.0</summary> ## [2.44.0](v2.43.0...v2.44.0) (2024-08-16) ### Features * update ErrorDetails to allow unpacking arbitrary messages ([#3073](#3073)) ([6913db5](6913db5)) ### Bug Fixes * Generator callable generation is based on method type ([#3075](#3075)) ([c21a013](c21a013)) * improve warnings for Direct Path xDS set via env ([#3019](#3019)) ([7a26115](7a26115)) ### Dependencies * update dependency argcomplete to v3.5.0 ([#3099](#3099)) ([0654a28](0654a28)) * update dependency black to v24.8.0 ([#3082](#3082)) ([a864f62](a864f62)) * update dependency com.google.crypto.tink:tink to v1.14.1 ([#3083](#3083)) ([c13b63e](c13b63e)) * update dependency com.google.errorprone:error_prone_annotations to v2.30.0 ([#3100](#3100)) ([a10ef54](a10ef54)) * update dependency com.google.errorprone:error_prone_annotations to v2.30.0 ([#3101](#3101)) ([9bff64f](9bff64f)) * update dependency lxml to v5.3.0 ([#3102](#3102)) ([4e145b1](4e145b1)) * update dependency org.apache.commons:commons-lang3 to v3.16.0 ([#3103](#3103)) ([95c9508](95c9508)) * update dependency org.checkerframework:checker-qual to v3.46.0 ([#3081](#3081)) ([2431920](2431920)) * update dependency org.easymock:easymock to v5.4.0 ([#3079](#3079)) ([182ae50](182ae50)) * update dependency pyyaml to v6.0.2 ([#3086](#3086)) ([f847e45](f847e45)) * update dependency watchdog to v4.0.2 ([#3094](#3094)) ([f1c75a1](f1c75a1)) * update google api dependencies ([#3071](#3071)) ([c5abe90](c5abe90)) * update google auth library dependencies to v1.24.1 ([#3109](#3109)) ([62acdd6](62acdd6)) * update googleapis/java-cloud-bom digest to a98202d ([#3097](#3097)) ([bb216ae](bb216ae)) * update googleapis/java-cloud-bom digest to ad905cc ([#3080](#3080)) ([250b26c](250b26c)) * update grpc dependencies to v1.66.0 ([#3104](#3104)) ([b63b643](b63b643)) * update opentelemetry-java monorepo to v1.41.0 ([#3105](#3105)) ([7364916](7364916)) * update protobuf to 3.25.4 ([#3113](#3113)) ([2b271fc](2b271fc)) * update slf4j monorepo to v2.0.16 ([#3098](#3098)) ([c13f932](c13f932)) ### Documentation * Update the Javadoc of ObsoleteApi.java ([#3088](#3088)) ([0ef6619](0ef6619)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
chingor13
pushed a commit
to googleapis/google-cloud-java
that referenced
this pull request
Mar 24, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>2.44.0</summary> ## [2.44.0](googleapis/sdk-platform-java@v2.43.0...v2.44.0) (2024-08-16) ### Features * update ErrorDetails to allow unpacking arbitrary messages ([#3073](googleapis/sdk-platform-java#3073)) ([4295c6b](googleapis/sdk-platform-java@4295c6b)) ### Bug Fixes * Generator callable generation is based on method type ([#3075](googleapis/sdk-platform-java#3075)) ([ab24c59](googleapis/sdk-platform-java@ab24c59)) * improve warnings for Direct Path xDS set via env ([#3019](googleapis/sdk-platform-java#3019)) ([62de788](googleapis/sdk-platform-java@62de788)) ### Dependencies * update dependency argcomplete to v3.5.0 ([#3099](googleapis/sdk-platform-java#3099)) ([d695ff6](googleapis/sdk-platform-java@d695ff6)) * update dependency black to v24.8.0 ([#3082](googleapis/sdk-platform-java#3082)) ([c897a2c](googleapis/sdk-platform-java@c897a2c)) * update dependency com.google.crypto.tink:tink to v1.14.1 ([#3083](googleapis/sdk-platform-java#3083)) ([49ff9d6](googleapis/sdk-platform-java@49ff9d6)) * update dependency com.google.errorprone:error_prone_annotations to v2.30.0 ([#3100](googleapis/sdk-platform-java#3100)) ([3062109](googleapis/sdk-platform-java@3062109)) * update dependency com.google.errorprone:error_prone_annotations to v2.30.0 ([#3101](googleapis/sdk-platform-java#3101)) ([3baed5e](googleapis/sdk-platform-java@3baed5e)) * update dependency lxml to v5.3.0 ([#3102](googleapis/sdk-platform-java#3102)) ([9b185de](googleapis/sdk-platform-java@9b185de)) * update dependency org.apache.commons:commons-lang3 to v3.16.0 ([#3103](googleapis/sdk-platform-java#3103)) ([3bec611](googleapis/sdk-platform-java@3bec611)) * update dependency org.checkerframework:checker-qual to v3.46.0 ([#3081](googleapis/sdk-platform-java#3081)) ([9c7a3a5](googleapis/sdk-platform-java@9c7a3a5)) * update dependency org.easymock:easymock to v5.4.0 ([#3079](googleapis/sdk-platform-java#3079)) ([fba92b1](googleapis/sdk-platform-java@fba92b1)) * update dependency pyyaml to v6.0.2 ([#3086](googleapis/sdk-platform-java#3086)) ([cb27b35](googleapis/sdk-platform-java@cb27b35)) * update dependency watchdog to v4.0.2 ([#3094](googleapis/sdk-platform-java#3094)) ([72ac190](googleapis/sdk-platform-java@72ac190)) * update google api dependencies ([#3071](googleapis/sdk-platform-java#3071)) ([815efac](googleapis/sdk-platform-java@815efac)) * update google auth library dependencies to v1.24.1 ([#3109](googleapis/sdk-platform-java#3109)) ([bd5236a](googleapis/sdk-platform-java@bd5236a)) * update googleapis/java-cloud-bom digest to a98202d ([#3097](googleapis/sdk-platform-java#3097)) ([4455861](googleapis/sdk-platform-java@4455861)) * update googleapis/java-cloud-bom digest to ad905cc ([#3080](googleapis/sdk-platform-java#3080)) ([fa245ae](googleapis/sdk-platform-java@fa245ae)) * update grpc dependencies to v1.66.0 ([#3104](googleapis/sdk-platform-java#3104)) ([934a2a4](googleapis/sdk-platform-java@934a2a4)) * update opentelemetry-java monorepo to v1.41.0 ([#3105](googleapis/sdk-platform-java#3105)) ([16540b0](googleapis/sdk-platform-java@16540b0)) * update protobuf to 3.25.4 ([#3113](googleapis/sdk-platform-java#3113)) ([f5d295d](googleapis/sdk-platform-java@f5d295d)) * update slf4j monorepo to v2.0.16 ([#3098](googleapis/sdk-platform-java#3098)) ([165e612](googleapis/sdk-platform-java@165e612)) ### Documentation * Update the Javadoc of ObsoleteApi.java ([#3088](googleapis/sdk-platform-java#3088)) ([7ed2a7e](googleapis/sdk-platform-java@7ed2a7e)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Because the google.rpc.Status.details is a google.protobuf.Any, it can contain any message. ErrorDetails conveniently unpacks the standard status message types from google/rpc/error_details.proto but some services provide their own error details types.
This new method allows unpacking those custom messages without deserializing the entire google.rpc.Status another time.