Skip to content

Commit

Permalink
fix: log requestId, extendedRequestId, cfId in $metadata (smithy-lang…
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored and srchase committed Mar 17, 2023
1 parent 5f0b8b0 commit 74c1ba4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ static void generateMetadataDeserializer(GenerationContext context, SymbolRefere
writer.openBlock("const deserializeMetadata = (output: $T): __ResponseMetadata => ({", "});", responseType,
() -> {
writer.write("httpStatusCode: output.statusCode,");
writer.write("requestId: output.headers[\"x-amzn-requestid\"]");
writer.write("requestId: output.headers[\"x-amzn-requestid\"] ??"
+ " output.headers[\"x-amzn-request-id\"],");
writer.write("extendedRequestId: output.headers[\"x-amz-id-2\"],");
writer.write("cfId: output.headers[\"x-amz-cf-id\"],");
});
writer.write("");
}
Expand Down

0 comments on commit 74c1ba4

Please sign in to comment.