The example does not set the FieldMask property that is required to make the call... #11017
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: docs
Improvement to the documentation for an API.
The readme says use this:
com.google.maps
google-maps-places
0.17.0
This code throws an error:
try (PlacesClient placesClient = PlacesClient.create()) {
GetPlaceRequest request =
GetPlaceRequest.newBuilder()
.setName(PlaceName.of("ChIJzU97rT_XZUcRJ1yuz1AvTP0").toString())
.setLanguageCode("languageCode-2092349083")
.setRegionCode("regionCode-1991004415")
// .setSessionToken("sessionToken-696552189")
.build();
ApiFuture future = placesClient.getPlaceCallable().futureCall(request);
// Do something.
Place response = future.get();
aused by: com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: FieldMask is a required parameter. See https://cloud.google.com/apis/docs/system-parameters on how to provide it. As an example, you can set the header 'X-Goog-FieldMask' to value 'displayName', 'id' to ask for the display name and the place id of a place. You can also set the value to '*' in manual testing to get all the available response fields.
Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: FieldMask is a required parameter. See https://cloud.google.com/apis/docs/system-parameters on how to provide it. As an example, you can set the header 'X-Goog-FieldMask' to value 'displayName', 'id' to ask for the display name and the place id of a place. You can also set the value to '*' in manual testing to get all the available response fields.
2024-07-14T22:56:51.591+02:00 WARN 13279 --- [ XNIO-2 task-2] .m.m.a.ExceptionHandlerExceptionResolver : Re
So the library is not compatible with the server code it seems and there is no way to set the FieldMask. Or at least give us an example of how to set this required field.
The text was updated successfully, but these errors were encountered: