googleapis / googleapis/google-cloud-java

[sdk-platform-java] Handle `google.rpc.ErrorInfo` in HttpJson*Stub class

Đang mở
#12,465 6 bình luận 0 reaction 1 người được giao Được @blakeli0 nhận Xem trên GitHub
priority: p3 type: feature request
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

Followup on googleapis/java-spanner#2229.

The generated HttpJsonEchoStub can't handle message type: `google.rpc.ErrorInfo` introduced by `echo.proto` (version `0.29.0`).
A easy integration test:
```
@Test
public void testEchoErrorDetails() {
EchoErrorDetailsResponse response = httpjsonClient.echoErrorDetails(
EchoErrorDetailsRequest
.newBuilder()
.setSingleDetailText("singleDetailText1774380934")
.addAllMultiDetailText(new ArrayList<>())
.build());
assertThat(response.hasSingleDetail()).isEqualTo(true);
}
```
failed with the following error message:
```
Caused by: com.google.protobuf.InvalidProtocolBufferException: Cannot resolve type: type.googleapis.com/google.rpc.ErrorInfo
at com.google.protobuf.util.JsonFormat$ParserImpl.mergeAny(JsonFormat.java:1511)
```

Possible solution:
Add the message type in
https://github.com/googleapis/sdk-platform-java/blob/003b993f7ad7cae8ae8c101e0ff147e517dcd83e/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java#L1279-L1286

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.