@aws-sdk/client-codeguru-reviewer 3.180.0 → 3.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist-cjs/protocols/Aws_restJson1.js +20 -14
- package/dist-es/protocols/Aws_restJson1.js +27 -14
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
12
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @aws-sdk/client-codeguru-reviewer
|
|
@@ -344,7 +344,7 @@ exports.deserializeAws_restJson1AssociateRepositoryCommand = deserializeAws_rest
|
|
|
344
344
|
const deserializeAws_restJson1AssociateRepositoryCommandError = async (output, context) => {
|
|
345
345
|
const parsedOutput = {
|
|
346
346
|
...output,
|
|
347
|
-
body: await
|
|
347
|
+
body: await parseErrorBody(output.body, context),
|
|
348
348
|
};
|
|
349
349
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
350
350
|
switch (errorCode) {
|
|
@@ -390,7 +390,7 @@ exports.deserializeAws_restJson1CreateCodeReviewCommand = deserializeAws_restJso
|
|
|
390
390
|
const deserializeAws_restJson1CreateCodeReviewCommandError = async (output, context) => {
|
|
391
391
|
const parsedOutput = {
|
|
392
392
|
...output,
|
|
393
|
-
body: await
|
|
393
|
+
body: await parseErrorBody(output.body, context),
|
|
394
394
|
};
|
|
395
395
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
396
396
|
switch (errorCode) {
|
|
@@ -439,7 +439,7 @@ exports.deserializeAws_restJson1DescribeCodeReviewCommand = deserializeAws_restJ
|
|
|
439
439
|
const deserializeAws_restJson1DescribeCodeReviewCommandError = async (output, context) => {
|
|
440
440
|
const parsedOutput = {
|
|
441
441
|
...output,
|
|
442
|
-
body: await
|
|
442
|
+
body: await parseErrorBody(output.body, context),
|
|
443
443
|
};
|
|
444
444
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
445
445
|
switch (errorCode) {
|
|
@@ -485,7 +485,7 @@ exports.deserializeAws_restJson1DescribeRecommendationFeedbackCommand = deserial
|
|
|
485
485
|
const deserializeAws_restJson1DescribeRecommendationFeedbackCommandError = async (output, context) => {
|
|
486
486
|
const parsedOutput = {
|
|
487
487
|
...output,
|
|
488
|
-
body: await
|
|
488
|
+
body: await parseErrorBody(output.body, context),
|
|
489
489
|
};
|
|
490
490
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
491
491
|
switch (errorCode) {
|
|
@@ -534,7 +534,7 @@ exports.deserializeAws_restJson1DescribeRepositoryAssociationCommand = deseriali
|
|
|
534
534
|
const deserializeAws_restJson1DescribeRepositoryAssociationCommandError = async (output, context) => {
|
|
535
535
|
const parsedOutput = {
|
|
536
536
|
...output,
|
|
537
|
-
body: await
|
|
537
|
+
body: await parseErrorBody(output.body, context),
|
|
538
538
|
};
|
|
539
539
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
540
540
|
switch (errorCode) {
|
|
@@ -583,7 +583,7 @@ exports.deserializeAws_restJson1DisassociateRepositoryCommand = deserializeAws_r
|
|
|
583
583
|
const deserializeAws_restJson1DisassociateRepositoryCommandError = async (output, context) => {
|
|
584
584
|
const parsedOutput = {
|
|
585
585
|
...output,
|
|
586
|
-
body: await
|
|
586
|
+
body: await parseErrorBody(output.body, context),
|
|
587
587
|
};
|
|
588
588
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
589
589
|
switch (errorCode) {
|
|
@@ -635,7 +635,7 @@ exports.deserializeAws_restJson1ListCodeReviewsCommand = deserializeAws_restJson
|
|
|
635
635
|
const deserializeAws_restJson1ListCodeReviewsCommandError = async (output, context) => {
|
|
636
636
|
const parsedOutput = {
|
|
637
637
|
...output,
|
|
638
|
-
body: await
|
|
638
|
+
body: await parseErrorBody(output.body, context),
|
|
639
639
|
};
|
|
640
640
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
641
641
|
switch (errorCode) {
|
|
@@ -681,7 +681,7 @@ exports.deserializeAws_restJson1ListRecommendationFeedbackCommand = deserializeA
|
|
|
681
681
|
const deserializeAws_restJson1ListRecommendationFeedbackCommandError = async (output, context) => {
|
|
682
682
|
const parsedOutput = {
|
|
683
683
|
...output,
|
|
684
|
-
body: await
|
|
684
|
+
body: await parseErrorBody(output.body, context),
|
|
685
685
|
};
|
|
686
686
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
687
687
|
switch (errorCode) {
|
|
@@ -730,7 +730,7 @@ exports.deserializeAws_restJson1ListRecommendationsCommand = deserializeAws_rest
|
|
|
730
730
|
const deserializeAws_restJson1ListRecommendationsCommandError = async (output, context) => {
|
|
731
731
|
const parsedOutput = {
|
|
732
732
|
...output,
|
|
733
|
-
body: await
|
|
733
|
+
body: await parseErrorBody(output.body, context),
|
|
734
734
|
};
|
|
735
735
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
736
736
|
switch (errorCode) {
|
|
@@ -779,7 +779,7 @@ exports.deserializeAws_restJson1ListRepositoryAssociationsCommand = deserializeA
|
|
|
779
779
|
const deserializeAws_restJson1ListRepositoryAssociationsCommandError = async (output, context) => {
|
|
780
780
|
const parsedOutput = {
|
|
781
781
|
...output,
|
|
782
|
-
body: await
|
|
782
|
+
body: await parseErrorBody(output.body, context),
|
|
783
783
|
};
|
|
784
784
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
785
785
|
switch (errorCode) {
|
|
@@ -819,7 +819,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
|
|
|
819
819
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
820
820
|
const parsedOutput = {
|
|
821
821
|
...output,
|
|
822
|
-
body: await
|
|
822
|
+
body: await parseErrorBody(output.body, context),
|
|
823
823
|
};
|
|
824
824
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
825
825
|
switch (errorCode) {
|
|
@@ -856,7 +856,7 @@ exports.deserializeAws_restJson1PutRecommendationFeedbackCommand = deserializeAw
|
|
|
856
856
|
const deserializeAws_restJson1PutRecommendationFeedbackCommandError = async (output, context) => {
|
|
857
857
|
const parsedOutput = {
|
|
858
858
|
...output,
|
|
859
|
-
body: await
|
|
859
|
+
body: await parseErrorBody(output.body, context),
|
|
860
860
|
};
|
|
861
861
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
862
862
|
switch (errorCode) {
|
|
@@ -899,7 +899,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
899
899
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
900
900
|
const parsedOutput = {
|
|
901
901
|
...output,
|
|
902
|
-
body: await
|
|
902
|
+
body: await parseErrorBody(output.body, context),
|
|
903
903
|
};
|
|
904
904
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
905
905
|
switch (errorCode) {
|
|
@@ -936,7 +936,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
936
936
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
937
937
|
const parsedOutput = {
|
|
938
938
|
...output,
|
|
939
|
-
body: await
|
|
939
|
+
body: await parseErrorBody(output.body, context),
|
|
940
940
|
};
|
|
941
941
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
942
942
|
switch (errorCode) {
|
|
@@ -1532,6 +1532,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1532
1532
|
}
|
|
1533
1533
|
return {};
|
|
1534
1534
|
});
|
|
1535
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1536
|
+
var _a;
|
|
1537
|
+
const value = await parseBody(errorBody, context);
|
|
1538
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1539
|
+
return value;
|
|
1540
|
+
};
|
|
1535
1541
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1536
1542
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1537
1543
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -410,7 +410,7 @@ var deserializeAws_restJson1AssociateRepositoryCommandError = function (output,
|
|
|
410
410
|
case 0:
|
|
411
411
|
_a = [__assign({}, output)];
|
|
412
412
|
_c = {};
|
|
413
|
-
return [4,
|
|
413
|
+
return [4, parseErrorBody(output.body, context)];
|
|
414
414
|
case 1:
|
|
415
415
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
416
416
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -482,7 +482,7 @@ var deserializeAws_restJson1CreateCodeReviewCommandError = function (output, con
|
|
|
482
482
|
case 0:
|
|
483
483
|
_a = [__assign({}, output)];
|
|
484
484
|
_c = {};
|
|
485
|
-
return [4,
|
|
485
|
+
return [4, parseErrorBody(output.body, context)];
|
|
486
486
|
case 1:
|
|
487
487
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
488
488
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -558,7 +558,7 @@ var deserializeAws_restJson1DescribeCodeReviewCommandError = function (output, c
|
|
|
558
558
|
case 0:
|
|
559
559
|
_a = [__assign({}, output)];
|
|
560
560
|
_c = {};
|
|
561
|
-
return [4,
|
|
561
|
+
return [4, parseErrorBody(output.body, context)];
|
|
562
562
|
case 1:
|
|
563
563
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
564
564
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -630,7 +630,7 @@ var deserializeAws_restJson1DescribeRecommendationFeedbackCommandError = functio
|
|
|
630
630
|
case 0:
|
|
631
631
|
_a = [__assign({}, output)];
|
|
632
632
|
_c = {};
|
|
633
|
-
return [4,
|
|
633
|
+
return [4, parseErrorBody(output.body, context)];
|
|
634
634
|
case 1:
|
|
635
635
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
636
636
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -705,7 +705,7 @@ var deserializeAws_restJson1DescribeRepositoryAssociationCommandError = function
|
|
|
705
705
|
case 0:
|
|
706
706
|
_a = [__assign({}, output)];
|
|
707
707
|
_c = {};
|
|
708
|
-
return [4,
|
|
708
|
+
return [4, parseErrorBody(output.body, context)];
|
|
709
709
|
case 1:
|
|
710
710
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
711
711
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -780,7 +780,7 @@ var deserializeAws_restJson1DisassociateRepositoryCommandError = function (outpu
|
|
|
780
780
|
case 0:
|
|
781
781
|
_a = [__assign({}, output)];
|
|
782
782
|
_c = {};
|
|
783
|
-
return [4,
|
|
783
|
+
return [4, parseErrorBody(output.body, context)];
|
|
784
784
|
case 1:
|
|
785
785
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
786
786
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -859,7 +859,7 @@ var deserializeAws_restJson1ListCodeReviewsCommandError = function (output, cont
|
|
|
859
859
|
case 0:
|
|
860
860
|
_a = [__assign({}, output)];
|
|
861
861
|
_c = {};
|
|
862
|
-
return [4,
|
|
862
|
+
return [4, parseErrorBody(output.body, context)];
|
|
863
863
|
case 1:
|
|
864
864
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
865
865
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -930,7 +930,7 @@ var deserializeAws_restJson1ListRecommendationFeedbackCommandError = function (o
|
|
|
930
930
|
case 0:
|
|
931
931
|
_a = [__assign({}, output)];
|
|
932
932
|
_c = {};
|
|
933
|
-
return [4,
|
|
933
|
+
return [4, parseErrorBody(output.body, context)];
|
|
934
934
|
case 1:
|
|
935
935
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
936
936
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1005,7 +1005,7 @@ var deserializeAws_restJson1ListRecommendationsCommandError = function (output,
|
|
|
1005
1005
|
case 0:
|
|
1006
1006
|
_a = [__assign({}, output)];
|
|
1007
1007
|
_c = {};
|
|
1008
|
-
return [4,
|
|
1008
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1009
1009
|
case 1:
|
|
1010
1010
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1011
1011
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1080,7 +1080,7 @@ var deserializeAws_restJson1ListRepositoryAssociationsCommandError = function (o
|
|
|
1080
1080
|
case 0:
|
|
1081
1081
|
_a = [__assign({}, output)];
|
|
1082
1082
|
_c = {};
|
|
1083
|
-
return [4,
|
|
1083
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1084
1084
|
case 1:
|
|
1085
1085
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1086
1086
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1144,7 +1144,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1144
1144
|
case 0:
|
|
1145
1145
|
_a = [__assign({}, output)];
|
|
1146
1146
|
_c = {};
|
|
1147
|
-
return [4,
|
|
1147
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1148
1148
|
case 1:
|
|
1149
1149
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1150
1150
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1203,7 +1203,7 @@ var deserializeAws_restJson1PutRecommendationFeedbackCommandError = function (ou
|
|
|
1203
1203
|
case 0:
|
|
1204
1204
|
_a = [__assign({}, output)];
|
|
1205
1205
|
_c = {};
|
|
1206
|
-
return [4,
|
|
1206
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1207
1207
|
case 1:
|
|
1208
1208
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1209
1209
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1270,7 +1270,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1270
1270
|
case 0:
|
|
1271
1271
|
_a = [__assign({}, output)];
|
|
1272
1272
|
_c = {};
|
|
1273
|
-
return [4,
|
|
1273
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1274
1274
|
case 1:
|
|
1275
1275
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1276
1276
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1329,7 +1329,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
1329
1329
|
case 0:
|
|
1330
1330
|
_a = [__assign({}, output)];
|
|
1331
1331
|
_c = {};
|
|
1332
|
-
return [4,
|
|
1332
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1333
1333
|
case 1:
|
|
1334
1334
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1335
1335
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1885,6 +1885,19 @@ var parseBody = function (streamBody, context) {
|
|
|
1885
1885
|
return {};
|
|
1886
1886
|
});
|
|
1887
1887
|
};
|
|
1888
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1889
|
+
var value;
|
|
1890
|
+
var _a;
|
|
1891
|
+
return __generator(this, function (_b) {
|
|
1892
|
+
switch (_b.label) {
|
|
1893
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1894
|
+
case 1:
|
|
1895
|
+
value = _b.sent();
|
|
1896
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1897
|
+
return [2, value];
|
|
1898
|
+
}
|
|
1899
|
+
});
|
|
1900
|
+
}); };
|
|
1888
1901
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1889
1902
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1890
1903
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-codeguru-reviewer",
|
|
3
3
|
"description": "AWS SDK for JavaScript Codeguru Reviewer Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.181.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.181.0",
|
|
23
23
|
"@aws-sdk/config-resolver": "3.178.0",
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.181.0",
|
|
25
25
|
"@aws-sdk/fetch-http-handler": "3.178.0",
|
|
26
26
|
"@aws-sdk/hash-node": "3.178.0",
|
|
27
27
|
"@aws-sdk/invalid-dependency": "3.178.0",
|