This repository was archived by the owner on Sep 26, 2023. It is now read-only.
Conversation
21f78ee to
fca3a67
Compare
meltsufin
approved these changes
Nov 18, 2021
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Dec 2, 2021
🤖 I have created a release \*beep\* \*boop\* --- ### [2.7.1](https://www.github.com/googleapis/gax-java/compare/v2.7.0...v2.7.1) (2021-12-02) ### Bug Fixes * fix gRPC code conversion ([#1555](https://www.github.com/googleapis/gax-java/issues/1555)) ([09b99d5](https://www.github.com/googleapis/gax-java/commit/09b99d591497b44c3c25b1a54abb0f1cb69d7376)) * pass error message when creating ApiException ([#1556](https://www.github.com/googleapis/gax-java/issues/1556)) ([918ae41](https://www.github.com/googleapis/gax-java/commit/918ae419f84ad5721638ca10eca992333e9f7c3d)) * revert generics syntax change in MockHttpService test utility ([#1574](https://www.github.com/googleapis/gax-java/issues/1574)) ([b629488](https://www.github.com/googleapis/gax-java/commit/b629488ffc7d68158158d9197695158f97229c7b)) * update exception mapping on HTTP error responses ([#1570](https://www.github.com/googleapis/gax-java/issues/1570)) ([8a170d1](https://www.github.com/googleapis/gax-java/commit/8a170d19b42e9b13d4c69dcfbe531d4d4ca69c90)) ### Dependencies * update grpc to 1.42.1 ([#1559](https://www.github.com/googleapis/gax-java/issues/1559)) ([92b7632](https://www.github.com/googleapis/gax-java/commit/92b76325d54604c98c798c489b3a963fdf21a75c)) * upgrade protobuf to 3.19.1 ([#1571](https://www.github.com/googleapis/gax-java/issues/1571)) ([7b354e7](https://www.github.com/googleapis/gax-java/commit/7b354e73b8ce49008bed51076afb255ca5dc68e4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
HttpJsonExceptionCallable: HTTP response code is first converted toCode(the actual HTTP code value is lost here during conversion), and later,StatusCode(which is designed to hold an HTTP response code value) is constructed from the convertedCode. The mapping back to HTTP codes is by the canned default values ofCode, so precision is lost due to the double conversion.HttpJsonStatusCode.of(com.google.rpc.Code rpcCode)is passingrpcCode.getNumber()(which returns integer values 0, 1, 2, 3 ...) as an argument that accepts the HTTP response code, which is wrong. As the best effort, give the canned default HTTP codes.Unrelated, I don't think there is a reason in our codebase to hold and carry an HTTP response code inside
HttpJsonStatusCode, which is not going to be used anywhere and only there to cause this sort of maintenance trouble.