awslabs / awslabs/aws-sdk-rust
NeptuneData get_propertygraph_stream fail on deserialization
- Dominant language
- Rust
- Stars
- 3.3k
- Forks
- 290
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 3
Description
### Describe the bug
I'm currently writing a custom synchronizer between `Neptune` and `OpenSearch`.
I'm consuming the property graph stream in order to aggregates data and index them in OpenSearch.
To do so, I create a call using AWS NeptuneData SDK and it fails inevitably while deserializing the response from the API. So I have to catch the error, read the raw response and deserialize my own struct from there.
The client method I'm using [get_propertygraph_stream](https://docs.rs/aws-sdk-neptunedata/latest/aws_sdk_neptunedata/client/struct.Client.html#method.get_propertygraph_stream). The method producing the error every time: [GetPropertygraphStreamFluentBuilder::send](https://docs.rs/aws-sdk-neptunedata/latest/aws_sdk_neptunedata/operation/get_propertygraph_stream/builders/struct.GetPropertygraphStreamFluentBuilder.html#method.send)
### Expected Behavior
The value returned is `Ok` and contains the `GetPropertygraphStreamOutput` with all data correctly deserialized.
### Current Behavior
Currently, the call always fail with the following error :
```
Err(
ServiceError(
ServiceError {
source: Unhandled(
Unhandled {
source: DeserializeError {
kind: Custom {
message: "expected ValueString or ValueNull",
source: None,
},
offset: None,
},
meta: ErrorMetadata {
code: None,
message: None,
extras: None,
},
},
),
raw: Response {
status: 200,
version: HTTP/1.1,
headers: {
...
```
I truncated the raw response to avoid leaking data from my client, but the error is present and the raw response status code is 200. The call clearly fails on deserialization.
### Reproduction Steps
```
let aws_config = aws_config::from_env().load().await;
let config = Config::new(aws_config).to_builder().endpoint_url(format!("https://my_neptune_endpoint:8182")).build();
let client = Client::from_conf(config);
let response = client
.get_propertygraph_stream()
.commit_num(1)
.op_num(1)
.limit(1)
.send()
.await;
println!("{response:#?}");
```
Moving `op_num`, `commit_num` or `limit` doesn't change the error. It is not specific to any part of the stream.
### Possible Solution
Seems like the deserialization fails because of field should be String or Null and the rule isn't matching. The error doesn't provide any further information
### Additional Information/Context
_No response_
### Version
```text
`
➜ cargo tree | grep aws-
├── aws-config v0.56.1
│ ├── aws-credential-types v0.56.1
│ │ ├── aws-smithy-async v0.56.1
│ │ ├── aws-smithy-types v0.56.1
│ ├── aws-http v0.56.1
│ │ ├── aws-credential-types v0.56.1 (*)
│ │ ├── aws-smithy-http v0.56.1
│ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-types v0.56.1
│ │ │ ├── aws-credential-types v0.56.1 (*)
│ │ │ ├── aws-smithy-async v0.56.1 (*)
│ │ │ ├── aws-smithy-client v0.56.1
│ │ │ │ ├── aws-smithy-async v0.56.1 (*)
│ │ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ │ ├── aws-smithy-http-tower v0.56.1
│ │ │ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ ├── aws-smithy-types v0.56.1 (*)
│ ├── aws-sdk-sso v0.30.0
│ │ ├── aws-credential-types v0.56.1 (*)
│ │ ├── aws-http v0.56.1 (*)
│ │ ├── aws-runtime v0.56.1
│ │ │ ├── aws-credential-types v0.56.1 (*)
│ │ │ ├── aws-http v0.56.1 (*)
│ │ │ ├── aws-sigv4 v0.56.1
│ │ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ ├── aws-smithy-async v0.56.1 (*)
│ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ ├── aws-smithy-runtime-api v0.56.1
│ │ │ │ ├── aws-smithy-async v0.56.1 (*)
│ │ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ │ ├── aws-types v0.56.1 (*)
│ │ ├── aws-smithy-async v0.56.1 (*)
│ │ ├── aws-smithy-client v0.56.1 (*)
│ │ ├── aws-smithy-http v0.56.1 (*)
│ │ ├── aws-smithy-json v0.56.1
│ │ │ └── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-smithy-runtime v0.56.1
│ │ │ ├── aws-smithy-async v0.56.1 (*)
│ │ │ ├── aws-smithy-client v0.56.1 (*)
│ │ │ ├── aws-smithy-http v0.56.1 (*)
│ │ │ ├── aws-smithy-runtime-api v0.56.1 (*)
│ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-smithy-runtime-api v0.56.1 (*)
│ │ ├── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-types v0.56.1 (*)
│ ├── aws-sdk-sts v0.30.0
│ │ ├── aws-credential-types v0.56.1 (*)
│ │ ├── aws-http v0.56.1 (*)
│ │ ├── aws-runtime v0.56.1 (*)
│ │ ├── aws-smithy-async v0.56.1 (*)
│ │ ├── aws-smithy-client v0.56.1 (*)
│ │ ├── aws-smithy-http v0.56.1 (*)
│ │ ├── aws-smithy-json v0.56.1 (*)
│ │ ├── aws-smithy-query v0.56.1
│ │ │ ├── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-smithy-runtime v0.56.1 (*)
│ │ ├── aws-smithy-runtime-api v0.56.1 (*)
│ │ ├── aws-smithy-types v0.56.1 (*)
│ │ ├── aws-smithy-xml v0.56.1
│ │ ├── aws-types v0.56.1 (*)
│ ├── aws-smithy-async v0.56.1 (*)
│ ├── aws-smithy-client v0.56.1 (*)
│ ├── aws-smithy-http v0.56.1 (*)
│ ├── aws-smithy-http-tower v0.56.1 (*)
│ ├── aws-smithy-json v0.56.1 (*)
│ ├── aws-smithy-types v0.56.1 (*)
│ ├── aws-types v0.56.1 (*)
├── aws-sdk-neptunedata v0.3.0
│ ├── aws-credential-types v0.56.1 (*)
│ ├── aws-http v0.56.1 (*)
│ ├── aws-runtime v0.56.1 (*)
│ ├── aws-smithy-async v0.56.1 (*)
│ ├── aws-smithy-client v0.56.1 (*)
│ ├── aws-smithy-http v0.56.1 (*)
│ ├── aws-smithy-json v0.56.1 (*)
│ ├── aws-smithy-runtime v0.56.1 (*)
│ ├── aws-smithy-runtime-api v0.56.1 (*)
│ ├── aws-smithy-types v0.56.1 (*)
│ ├── aws-types v0.56.1 (*)
│ ├── aws-credential-types v0.56.1 (*)
│ ├── aws-sigv4 v0.56.1 (*)
│ ├── aws-types v0.56.1 (*)
`
```
### Environment details (OS name and version, etc.)
OS: Garuda Linux, Release: Soaring, Codename: Raptor
### Logs
_No response_
Contributor guide
Research direction
Start with GetPropertygraphStreamFluentBuilder::send and the provided reproduction, then inspect the raw 200 response alongside the get_propertygraph_stream output deserialization. Compare the response fields with the generated GetPropertygraphStreamOutput expectations. Done means the same call returns Ok with all stream data correctly deserialized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100