Skip to content

Commit

Permalink
fix(smithy-client): add header check for x-amz-request-id (#4295)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Dec 16, 2022
1 parent cbfce1d commit efdda44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/smithy-client/src/default-error-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode

const deserializeMetadata = (output: HttpResponse): ResponseMetadata => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
requestId:
output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});

0 comments on commit efdda44

Please sign in to comment.