In case a client.snapshot().restore is done then always a MissingRequiredPropertyException
is thrown with the message Missing required property 'RestoreResponse.snapshot'.
The snapshot in the response is checked in constructor of RestoreResponse against requireNonNull.
co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'RestoreResponse.snapshot'
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse.<init>(RestoreResponse.java:57)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse.<init>(RestoreResponse.java:50)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse$Builder.build(RestoreResponse.java:131)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse$Builder.build(RestoreResponse.java:99)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:80)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.transport.rest_client.RestClientTransport.decodeResponse(RestClientTransport.java:328)
at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:294)
at co.elastic.clients.transport.rest_client.RestClientTransport.performRequest(RestClientTransport.java:147)
at co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient.restore(ElasticsearchSnapshotClient.java:361)
Java API client version
8.4.3 / 8.2.3
Java version
11
Elasticsearch Version
8.2.3
Problem description
In case a
client.snapshot().restore
is done then always aMissingRequiredPropertyException
is thrown with the messageMissing required property 'RestoreResponse.snapshot'
. Thesnapshot
in the response is checked in constructor ofRestoreResponse
against requireNonNull.