pub fn parse_extended_error(
    error: aws_smithy_types::Error,
    headers: &HeaderMap<HeaderValue>,
) -> aws_smithy_types::Error {
    let mut builder = error.into_builder();
    let host_id = headers
        .get("x-amz-id-2")
        .and_then(|header_value| header_value.to_str().ok());
    if let Some(host_id) = host_id {
        builder.custom(EXTENDED_REQUEST_ID, host_id);
    }
    builder.build()
}
/// Parses the S3 Extended Request ID out of S3 error response headers.
Parses the S3 Extended Request ID out of S3 error response headers.
Parses the S3 Extended Request ID out of S3 error response headers .
pub fn parse_extended_error(
    error: aws_smithy_types::Error,
    headers: &HeaderMap<HeaderValue>,
) -> aws_smithy_types::Error {
    let mut builder = error.into_builder();
    let host_id = headers
        .get("x-amz-id-2")
        .and_then(|header_value| header_value.to_str().ok());
    if let Some(host_id) = host_id {
        builder.custom(EXTENDED_REQUEST_ID, host_id);
    }
    builder.build()
}
pub fn parse_extended_error ( error : aws_smithy_types :: Error , headers : & HeaderMap < HeaderValue > , ) -> aws_smithy_types :: Error { let mut builder = error . into_builder ( ) ; let host_id = headers . get ( " " ) . and_then ( | header_value | header_value . to_str ( ) . ok ( ) ) ; if let Some ( host_id ) = host_id { builder . custom ( EXTENDED_REQUEST_ID , host_id ) ; } builder . build ( ) }
Parses the S3 Extended Request ID out of S3 error response headers.
Parses the S3 Extended Request ID out of S3 error response headers .
error
aws_smithy_types::Error
headers
&HeaderMap<HeaderValue>
error
aws_smithy_types::Error
headers
&HeaderMap<HeaderValue>