@Test
public void testEchoErrorDetails() {
EchoErrorDetailsResponse response = httpjsonClient.echoErrorDetails(
EchoErrorDetailsRequest
.newBuilder()
.setSingleDetailText("singleDetailText1774380934")
.addAllMultiDetailText(new ArrayList<>())
.build());
assertThat(response.hasSingleDetail()).isEqualTo(true);
}
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)
Followup on googleapis/java-spanner#2229.
The generated HttpJsonEchoStub can't handle message type:
google.rpc.ErrorInfointroduced byecho.proto(version0.29.0).A easy integration test:
failed with the following error message:
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