@aws-sdk/client-amp 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 +27 -21
- package/dist-es/protocols/Aws_restJson1.js +34 -21
- 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-amp
|
|
@@ -486,7 +486,7 @@ exports.deserializeAws_restJson1CreateAlertManagerDefinitionCommand = deserializ
|
|
|
486
486
|
const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async (output, context) => {
|
|
487
487
|
const parsedOutput = {
|
|
488
488
|
...output,
|
|
489
|
-
body: await
|
|
489
|
+
body: await parseErrorBody(output.body, context),
|
|
490
490
|
};
|
|
491
491
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
492
492
|
switch (errorCode) {
|
|
@@ -538,7 +538,7 @@ exports.deserializeAws_restJson1CreateLoggingConfigurationCommand = deserializeA
|
|
|
538
538
|
const deserializeAws_restJson1CreateLoggingConfigurationCommandError = async (output, context) => {
|
|
539
539
|
const parsedOutput = {
|
|
540
540
|
...output,
|
|
541
|
-
body: await
|
|
541
|
+
body: await parseErrorBody(output.body, context),
|
|
542
542
|
};
|
|
543
543
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
544
544
|
switch (errorCode) {
|
|
@@ -590,7 +590,7 @@ exports.deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = deserializeAw
|
|
|
590
590
|
const deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
591
591
|
const parsedOutput = {
|
|
592
592
|
...output,
|
|
593
|
-
body: await
|
|
593
|
+
body: await parseErrorBody(output.body, context),
|
|
594
594
|
};
|
|
595
595
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
596
596
|
switch (errorCode) {
|
|
@@ -651,7 +651,7 @@ exports.deserializeAws_restJson1CreateWorkspaceCommand = deserializeAws_restJson
|
|
|
651
651
|
const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, context) => {
|
|
652
652
|
const parsedOutput = {
|
|
653
653
|
...output,
|
|
654
|
-
body: await
|
|
654
|
+
body: await parseErrorBody(output.body, context),
|
|
655
655
|
};
|
|
656
656
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
657
657
|
switch (errorCode) {
|
|
@@ -697,7 +697,7 @@ exports.deserializeAws_restJson1DeleteAlertManagerDefinitionCommand = deserializ
|
|
|
697
697
|
const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async (output, context) => {
|
|
698
698
|
const parsedOutput = {
|
|
699
699
|
...output,
|
|
700
|
-
body: await
|
|
700
|
+
body: await parseErrorBody(output.body, context),
|
|
701
701
|
};
|
|
702
702
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
703
703
|
switch (errorCode) {
|
|
@@ -743,7 +743,7 @@ exports.deserializeAws_restJson1DeleteLoggingConfigurationCommand = deserializeA
|
|
|
743
743
|
const deserializeAws_restJson1DeleteLoggingConfigurationCommandError = async (output, context) => {
|
|
744
744
|
const parsedOutput = {
|
|
745
745
|
...output,
|
|
746
|
-
body: await
|
|
746
|
+
body: await parseErrorBody(output.body, context),
|
|
747
747
|
};
|
|
748
748
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
749
749
|
switch (errorCode) {
|
|
@@ -786,7 +786,7 @@ exports.deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = deserializeAw
|
|
|
786
786
|
const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
787
787
|
const parsedOutput = {
|
|
788
788
|
...output,
|
|
789
|
-
body: await
|
|
789
|
+
body: await parseErrorBody(output.body, context),
|
|
790
790
|
};
|
|
791
791
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
792
792
|
switch (errorCode) {
|
|
@@ -832,7 +832,7 @@ exports.deserializeAws_restJson1DeleteWorkspaceCommand = deserializeAws_restJson
|
|
|
832
832
|
const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, context) => {
|
|
833
833
|
const parsedOutput = {
|
|
834
834
|
...output,
|
|
835
|
-
body: await
|
|
835
|
+
body: await parseErrorBody(output.body, context),
|
|
836
836
|
};
|
|
837
837
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
838
838
|
switch (errorCode) {
|
|
@@ -881,7 +881,7 @@ exports.deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = deserial
|
|
|
881
881
|
const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async (output, context) => {
|
|
882
882
|
const parsedOutput = {
|
|
883
883
|
...output,
|
|
884
|
-
body: await
|
|
884
|
+
body: await parseErrorBody(output.body, context),
|
|
885
885
|
};
|
|
886
886
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
887
887
|
switch (errorCode) {
|
|
@@ -927,7 +927,7 @@ exports.deserializeAws_restJson1DescribeLoggingConfigurationCommand = deserializ
|
|
|
927
927
|
const deserializeAws_restJson1DescribeLoggingConfigurationCommandError = async (output, context) => {
|
|
928
928
|
const parsedOutput = {
|
|
929
929
|
...output,
|
|
930
|
-
body: await
|
|
930
|
+
body: await parseErrorBody(output.body, context),
|
|
931
931
|
};
|
|
932
932
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
933
933
|
switch (errorCode) {
|
|
@@ -970,7 +970,7 @@ exports.deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = deserialize
|
|
|
970
970
|
const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
971
971
|
const parsedOutput = {
|
|
972
972
|
...output,
|
|
973
|
-
body: await
|
|
973
|
+
body: await parseErrorBody(output.body, context),
|
|
974
974
|
};
|
|
975
975
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
976
976
|
switch (errorCode) {
|
|
@@ -1016,7 +1016,7 @@ exports.deserializeAws_restJson1DescribeWorkspaceCommand = deserializeAws_restJs
|
|
|
1016
1016
|
const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, context) => {
|
|
1017
1017
|
const parsedOutput = {
|
|
1018
1018
|
...output,
|
|
1019
|
-
body: await
|
|
1019
|
+
body: await parseErrorBody(output.body, context),
|
|
1020
1020
|
};
|
|
1021
1021
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1022
1022
|
switch (errorCode) {
|
|
@@ -1065,7 +1065,7 @@ exports.deserializeAws_restJson1ListRuleGroupsNamespacesCommand = deserializeAws
|
|
|
1065
1065
|
const deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = async (output, context) => {
|
|
1066
1066
|
const parsedOutput = {
|
|
1067
1067
|
...output,
|
|
1068
|
-
body: await
|
|
1068
|
+
body: await parseErrorBody(output.body, context),
|
|
1069
1069
|
};
|
|
1070
1070
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1071
1071
|
switch (errorCode) {
|
|
@@ -1111,7 +1111,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
|
|
|
1111
1111
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1112
1112
|
const parsedOutput = {
|
|
1113
1113
|
...output,
|
|
1114
|
-
body: await
|
|
1114
|
+
body: await parseErrorBody(output.body, context),
|
|
1115
1115
|
};
|
|
1116
1116
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1117
1117
|
switch (errorCode) {
|
|
@@ -1160,7 +1160,7 @@ exports.deserializeAws_restJson1ListWorkspacesCommand = deserializeAws_restJson1
|
|
|
1160
1160
|
const deserializeAws_restJson1ListWorkspacesCommandError = async (output, context) => {
|
|
1161
1161
|
const parsedOutput = {
|
|
1162
1162
|
...output,
|
|
1163
|
-
body: await
|
|
1163
|
+
body: await parseErrorBody(output.body, context),
|
|
1164
1164
|
};
|
|
1165
1165
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1166
1166
|
switch (errorCode) {
|
|
@@ -1203,7 +1203,7 @@ exports.deserializeAws_restJson1PutAlertManagerDefinitionCommand = deserializeAw
|
|
|
1203
1203
|
const deserializeAws_restJson1PutAlertManagerDefinitionCommandError = async (output, context) => {
|
|
1204
1204
|
const parsedOutput = {
|
|
1205
1205
|
...output,
|
|
1206
|
-
body: await
|
|
1206
|
+
body: await parseErrorBody(output.body, context),
|
|
1207
1207
|
};
|
|
1208
1208
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1209
1209
|
switch (errorCode) {
|
|
@@ -1264,7 +1264,7 @@ exports.deserializeAws_restJson1PutRuleGroupsNamespaceCommand = deserializeAws_r
|
|
|
1264
1264
|
const deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
1265
1265
|
const parsedOutput = {
|
|
1266
1266
|
...output,
|
|
1267
|
-
body: await
|
|
1267
|
+
body: await parseErrorBody(output.body, context),
|
|
1268
1268
|
};
|
|
1269
1269
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1270
1270
|
switch (errorCode) {
|
|
@@ -1313,7 +1313,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
1313
1313
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1314
1314
|
const parsedOutput = {
|
|
1315
1315
|
...output,
|
|
1316
|
-
body: await
|
|
1316
|
+
body: await parseErrorBody(output.body, context),
|
|
1317
1317
|
};
|
|
1318
1318
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1319
1319
|
switch (errorCode) {
|
|
@@ -1356,7 +1356,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
1356
1356
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1357
1357
|
const parsedOutput = {
|
|
1358
1358
|
...output,
|
|
1359
|
-
body: await
|
|
1359
|
+
body: await parseErrorBody(output.body, context),
|
|
1360
1360
|
};
|
|
1361
1361
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1362
1362
|
switch (errorCode) {
|
|
@@ -1402,7 +1402,7 @@ exports.deserializeAws_restJson1UpdateLoggingConfigurationCommand = deserializeA
|
|
|
1402
1402
|
const deserializeAws_restJson1UpdateLoggingConfigurationCommandError = async (output, context) => {
|
|
1403
1403
|
const parsedOutput = {
|
|
1404
1404
|
...output,
|
|
1405
|
-
body: await
|
|
1405
|
+
body: await parseErrorBody(output.body, context),
|
|
1406
1406
|
};
|
|
1407
1407
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1408
1408
|
switch (errorCode) {
|
|
@@ -1445,7 +1445,7 @@ exports.deserializeAws_restJson1UpdateWorkspaceAliasCommand = deserializeAws_res
|
|
|
1445
1445
|
const deserializeAws_restJson1UpdateWorkspaceAliasCommandError = async (output, context) => {
|
|
1446
1446
|
const parsedOutput = {
|
|
1447
1447
|
...output,
|
|
1448
|
-
body: await
|
|
1448
|
+
body: await parseErrorBody(output.body, context),
|
|
1449
1449
|
};
|
|
1450
1450
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1451
1451
|
switch (errorCode) {
|
|
@@ -1781,6 +1781,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1781
1781
|
}
|
|
1782
1782
|
return {};
|
|
1783
1783
|
});
|
|
1784
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1785
|
+
var _a;
|
|
1786
|
+
const value = await parseBody(errorBody, context);
|
|
1787
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1788
|
+
return value;
|
|
1789
|
+
};
|
|
1784
1790
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1785
1791
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1786
1792
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -574,7 +574,7 @@ var deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = function
|
|
|
574
574
|
case 0:
|
|
575
575
|
_a = [__assign({}, output)];
|
|
576
576
|
_c = {};
|
|
577
|
-
return [4,
|
|
577
|
+
return [4, parseErrorBody(output.body, context)];
|
|
578
578
|
case 1:
|
|
579
579
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
580
580
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -654,7 +654,7 @@ var deserializeAws_restJson1CreateLoggingConfigurationCommandError = function (o
|
|
|
654
654
|
case 0:
|
|
655
655
|
_a = [__assign({}, output)];
|
|
656
656
|
_c = {};
|
|
657
|
-
return [4,
|
|
657
|
+
return [4, parseErrorBody(output.body, context)];
|
|
658
658
|
case 1:
|
|
659
659
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
660
660
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -731,7 +731,7 @@ var deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = function (ou
|
|
|
731
731
|
case 0:
|
|
732
732
|
_a = [__assign({}, output)];
|
|
733
733
|
_c = {};
|
|
734
|
-
return [4,
|
|
734
|
+
return [4, parseErrorBody(output.body, context)];
|
|
735
735
|
case 1:
|
|
736
736
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
737
737
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -820,7 +820,7 @@ var deserializeAws_restJson1CreateWorkspaceCommandError = function (output, cont
|
|
|
820
820
|
case 0:
|
|
821
821
|
_a = [__assign({}, output)];
|
|
822
822
|
_c = {};
|
|
823
|
-
return [4,
|
|
823
|
+
return [4, parseErrorBody(output.body, context)];
|
|
824
824
|
case 1:
|
|
825
825
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
826
826
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -891,7 +891,7 @@ var deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = function
|
|
|
891
891
|
case 0:
|
|
892
892
|
_a = [__assign({}, output)];
|
|
893
893
|
_c = {};
|
|
894
|
-
return [4,
|
|
894
|
+
return [4, parseErrorBody(output.body, context)];
|
|
895
895
|
case 1:
|
|
896
896
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
897
897
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -962,7 +962,7 @@ var deserializeAws_restJson1DeleteLoggingConfigurationCommandError = function (o
|
|
|
962
962
|
case 0:
|
|
963
963
|
_a = [__assign({}, output)];
|
|
964
964
|
_c = {};
|
|
965
|
-
return [4,
|
|
965
|
+
return [4, parseErrorBody(output.body, context)];
|
|
966
966
|
case 1:
|
|
967
967
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
968
968
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1029,7 +1029,7 @@ var deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = function (ou
|
|
|
1029
1029
|
case 0:
|
|
1030
1030
|
_a = [__assign({}, output)];
|
|
1031
1031
|
_c = {};
|
|
1032
|
-
return [4,
|
|
1032
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1033
1033
|
case 1:
|
|
1034
1034
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1035
1035
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1100,7 +1100,7 @@ var deserializeAws_restJson1DeleteWorkspaceCommandError = function (output, cont
|
|
|
1100
1100
|
case 0:
|
|
1101
1101
|
_a = [__assign({}, output)];
|
|
1102
1102
|
_c = {};
|
|
1103
|
-
return [4,
|
|
1103
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1104
1104
|
case 1:
|
|
1105
1105
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1106
1106
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1176,7 +1176,7 @@ var deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = functio
|
|
|
1176
1176
|
case 0:
|
|
1177
1177
|
_a = [__assign({}, output)];
|
|
1178
1178
|
_c = {};
|
|
1179
|
-
return [4,
|
|
1179
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1180
1180
|
case 1:
|
|
1181
1181
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1182
1182
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1248,7 +1248,7 @@ var deserializeAws_restJson1DescribeLoggingConfigurationCommandError = function
|
|
|
1248
1248
|
case 0:
|
|
1249
1249
|
_a = [__assign({}, output)];
|
|
1250
1250
|
_c = {};
|
|
1251
|
-
return [4,
|
|
1251
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1252
1252
|
case 1:
|
|
1253
1253
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1254
1254
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1316,7 +1316,7 @@ var deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = function (
|
|
|
1316
1316
|
case 0:
|
|
1317
1317
|
_a = [__assign({}, output)];
|
|
1318
1318
|
_c = {};
|
|
1319
|
-
return [4,
|
|
1319
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1320
1320
|
case 1:
|
|
1321
1321
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1322
1322
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1388,7 +1388,7 @@ var deserializeAws_restJson1DescribeWorkspaceCommandError = function (output, co
|
|
|
1388
1388
|
case 0:
|
|
1389
1389
|
_a = [__assign({}, output)];
|
|
1390
1390
|
_c = {};
|
|
1391
|
-
return [4,
|
|
1391
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1392
1392
|
case 1:
|
|
1393
1393
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1394
1394
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1463,7 +1463,7 @@ var deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = function (out
|
|
|
1463
1463
|
case 0:
|
|
1464
1464
|
_a = [__assign({}, output)];
|
|
1465
1465
|
_c = {};
|
|
1466
|
-
return [4,
|
|
1466
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1467
1467
|
case 1:
|
|
1468
1468
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1469
1469
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1535,7 +1535,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1535
1535
|
case 0:
|
|
1536
1536
|
_a = [__assign({}, output)];
|
|
1537
1537
|
_c = {};
|
|
1538
|
-
return [4,
|
|
1538
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1539
1539
|
case 1:
|
|
1540
1540
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1541
1541
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1610,7 +1610,7 @@ var deserializeAws_restJson1ListWorkspacesCommandError = function (output, conte
|
|
|
1610
1610
|
case 0:
|
|
1611
1611
|
_a = [__assign({}, output)];
|
|
1612
1612
|
_c = {};
|
|
1613
|
-
return [4,
|
|
1613
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1614
1614
|
case 1:
|
|
1615
1615
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1616
1616
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1678,7 +1678,7 @@ var deserializeAws_restJson1PutAlertManagerDefinitionCommandError = function (ou
|
|
|
1678
1678
|
case 0:
|
|
1679
1679
|
_a = [__assign({}, output)];
|
|
1680
1680
|
_c = {};
|
|
1681
|
-
return [4,
|
|
1681
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1682
1682
|
case 1:
|
|
1683
1683
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1684
1684
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1767,7 +1767,7 @@ var deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = function (outpu
|
|
|
1767
1767
|
case 0:
|
|
1768
1768
|
_a = [__assign({}, output)];
|
|
1769
1769
|
_c = {};
|
|
1770
|
-
return [4,
|
|
1770
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1771
1771
|
case 1:
|
|
1772
1772
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1773
1773
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1842,7 +1842,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1842
1842
|
case 0:
|
|
1843
1843
|
_a = [__assign({}, output)];
|
|
1844
1844
|
_c = {};
|
|
1845
|
-
return [4,
|
|
1845
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1846
1846
|
case 1:
|
|
1847
1847
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1848
1848
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1909,7 +1909,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
1909
1909
|
case 0:
|
|
1910
1910
|
_a = [__assign({}, output)];
|
|
1911
1911
|
_c = {};
|
|
1912
|
-
return [4,
|
|
1912
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1913
1913
|
case 1:
|
|
1914
1914
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1915
1915
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1981,7 +1981,7 @@ var deserializeAws_restJson1UpdateLoggingConfigurationCommandError = function (o
|
|
|
1981
1981
|
case 0:
|
|
1982
1982
|
_a = [__assign({}, output)];
|
|
1983
1983
|
_c = {};
|
|
1984
|
-
return [4,
|
|
1984
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1985
1985
|
case 1:
|
|
1986
1986
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1987
1987
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2048,7 +2048,7 @@ var deserializeAws_restJson1UpdateWorkspaceAliasCommandError = function (output,
|
|
|
2048
2048
|
case 0:
|
|
2049
2049
|
_a = [__assign({}, output)];
|
|
2050
2050
|
_c = {};
|
|
2051
|
-
return [4,
|
|
2051
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2052
2052
|
case 1:
|
|
2053
2053
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2054
2054
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2403,6 +2403,19 @@ var parseBody = function (streamBody, context) {
|
|
|
2403
2403
|
return {};
|
|
2404
2404
|
});
|
|
2405
2405
|
};
|
|
2406
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2407
|
+
var value;
|
|
2408
|
+
var _a;
|
|
2409
|
+
return __generator(this, function (_b) {
|
|
2410
|
+
switch (_b.label) {
|
|
2411
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
2412
|
+
case 1:
|
|
2413
|
+
value = _b.sent();
|
|
2414
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2415
|
+
return [2, value];
|
|
2416
|
+
}
|
|
2417
|
+
});
|
|
2418
|
+
}); };
|
|
2406
2419
|
var loadRestJsonErrorCode = function (output, data) {
|
|
2407
2420
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2408
2421
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-amp",
|
|
3
3
|
"description": "AWS SDK for JavaScript Amp 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",
|