Skip to content

Commit 6d4e6b5

Browse files
authored
fix(clients): parse status code bindings in rest protocols (#2483)
1 parent ff9df37 commit 6d4e6b5

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

clients/client-glacier/protocols/Aws_restJson1.ts

+3
Original file line numberDiff line numberDiff line change
@@ -2621,6 +2621,9 @@ export const deserializeAws_restJson1GetJobOutputCommand = async (
26212621
}
26222622
const data: any = output.body;
26232623
contents.body = data;
2624+
if (contents.status === undefined) {
2625+
contents.status = output.statusCode;
2626+
}
26242627
return Promise.resolve(contents);
26252628
};
26262629

clients/client-lambda/protocols/Aws_restJson1.ts

+3
Original file line numberDiff line numberDiff line change
@@ -5420,6 +5420,9 @@ export const deserializeAws_restJson1InvokeCommand = async (
54205420
}
54215421
const data: any = await collectBody(output.body, context);
54225422
contents.Payload = data;
5423+
if (contents.StatusCode === undefined) {
5424+
contents.StatusCode = output.statusCode;
5425+
}
54235426
return Promise.resolve(contents);
54245427
};
54255428

clients/client-mediastore-data/protocols/Aws_restJson1.ts

+3
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,9 @@ export const deserializeAws_restJson1GetObjectCommand = async (
389389
}
390390
const data: any = output.body;
391391
contents.Body = data;
392+
if (contents.StatusCode === undefined) {
393+
contents.StatusCode = output.statusCode;
394+
}
392395
return Promise.resolve(contents);
393396
};
394397

0 commit comments

Comments
 (0)