We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's a trait impl like
impl<E: Error + 'static> fmt::Display for RusotoError<E> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { // … RusotoError::Unknown(ref cause) => write!( f, "Request ID: {:?} Body: {}", cause.headers.get(AWS_REQUEST_ID_HEADER), cause.body_as_str() ), // ... } }
and
/// Header used by AWS on responses to identify the request pub const AWS_REQUEST_ID_HEADER: &str = "x-amzn-requestid";
but this isn't completely correct. For example, I sent a PutObjectRequest with md5 set to Some("fake") and in response I got:
Some("fake")
Request ID: None Body: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidDigest</Code><Message>The Content-MD5 you specified was invalid.</Message><Content-MD5>fake</Content-MD5><RequestId>M99NXA1M3GDBERKX</RequestId><HostId>8eomc+jLMa4yGJk8BsYCCUdyd4mKVHhUA+/ILHFdcrVKMEcEbAKdnH8cAMXnDpeKkH99yqJkJis=</HostId></Error> (Unknown(BufferedHttpResponse {status: 400, body: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidDigest</Code><Message>The Content-MD5 you specified was invalid.</Message><Content-MD5>fake</Content-MD5><RequestId>M99NXA1M3GDBERKX</RequestId><HostId>8eomc+jLMa4yGJk8BsYCCUdyd4mKVHhUA+/ILHFdcrVKMEcEbAKdnH8cAMXnDpeKkH99yqJkJis=</HostId></Error>", headers: {"x-amz-request-id": "M99NXA1M3GDBERKX", "x-amz-id-2": "8eomc+jLMa4yGJk8BsYCCUdyd4mKVHhUA+/ILHFdcrVKMEcEbAKdnH8cAMXnDpeKkH99yqJkJis=", "content-type": "application/xml", "transfer-encoding": "chunked", "date": "Tue, 08 Nov 2022 01:57:22 GMT", "server": "AmazonS3", "connection": "close"} })) (should_retry: false)
You'll notice how the header is x-amz-requestid so the Display instance fails to pick it up and shows None.
x-amz-requestid
None
I noticed that some API docs such as https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-logging-variables.html specify that it can be either one:
The AWS endpoint's request ID from the x-amz-request-id or x-amzn-requestId header.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There's a trait impl like
and
but this isn't completely correct. For example, I sent a PutObjectRequest with md5 set to
Some("fake")
and in response I got:You'll notice how the header is
x-amz-requestid
so the Display instance fails to pick it up and showsNone
.I noticed that some API docs such as https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-logging-variables.html specify that it can be either one:
The text was updated successfully, but these errors were encountered: