@aws-sdk/client-ram 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 +31 -25
- package/dist-es/protocols/Aws_restJson1.js +38 -25
- 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-ram
|
|
@@ -648,7 +648,7 @@ exports.deserializeAws_restJson1AcceptResourceShareInvitationCommand = deseriali
|
|
|
648
648
|
const deserializeAws_restJson1AcceptResourceShareInvitationCommandError = async (output, context) => {
|
|
649
649
|
const parsedOutput = {
|
|
650
650
|
...output,
|
|
651
|
-
body: await
|
|
651
|
+
body: await parseErrorBody(output.body, context),
|
|
652
652
|
};
|
|
653
653
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
654
654
|
switch (errorCode) {
|
|
@@ -712,7 +712,7 @@ exports.deserializeAws_restJson1AssociateResourceShareCommand = deserializeAws_r
|
|
|
712
712
|
const deserializeAws_restJson1AssociateResourceShareCommandError = async (output, context) => {
|
|
713
713
|
const parsedOutput = {
|
|
714
714
|
...output,
|
|
715
|
-
body: await
|
|
715
|
+
body: await parseErrorBody(output.body, context),
|
|
716
716
|
};
|
|
717
717
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
718
718
|
switch (errorCode) {
|
|
@@ -779,7 +779,7 @@ exports.deserializeAws_restJson1AssociateResourceSharePermissionCommand = deseri
|
|
|
779
779
|
const deserializeAws_restJson1AssociateResourceSharePermissionCommandError = 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) {
|
|
@@ -834,7 +834,7 @@ exports.deserializeAws_restJson1CreateResourceShareCommand = deserializeAws_rest
|
|
|
834
834
|
const deserializeAws_restJson1CreateResourceShareCommandError = async (output, context) => {
|
|
835
835
|
const parsedOutput = {
|
|
836
836
|
...output,
|
|
837
|
-
body: await
|
|
837
|
+
body: await parseErrorBody(output.body, context),
|
|
838
838
|
};
|
|
839
839
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
840
840
|
switch (errorCode) {
|
|
@@ -901,7 +901,7 @@ exports.deserializeAws_restJson1DeleteResourceShareCommand = deserializeAws_rest
|
|
|
901
901
|
const deserializeAws_restJson1DeleteResourceShareCommandError = async (output, context) => {
|
|
902
902
|
const parsedOutput = {
|
|
903
903
|
...output,
|
|
904
|
-
body: await
|
|
904
|
+
body: await parseErrorBody(output.body, context),
|
|
905
905
|
};
|
|
906
906
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
907
|
switch (errorCode) {
|
|
@@ -962,7 +962,7 @@ exports.deserializeAws_restJson1DisassociateResourceShareCommand = deserializeAw
|
|
|
962
962
|
const deserializeAws_restJson1DisassociateResourceShareCommandError = async (output, context) => {
|
|
963
963
|
const parsedOutput = {
|
|
964
964
|
...output,
|
|
965
|
-
body: await
|
|
965
|
+
body: await parseErrorBody(output.body, context),
|
|
966
966
|
};
|
|
967
967
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
968
968
|
switch (errorCode) {
|
|
@@ -1026,7 +1026,7 @@ exports.deserializeAws_restJson1DisassociateResourceSharePermissionCommand = des
|
|
|
1026
1026
|
const deserializeAws_restJson1DisassociateResourceSharePermissionCommandError = async (output, context) => {
|
|
1027
1027
|
const parsedOutput = {
|
|
1028
1028
|
...output,
|
|
1029
|
-
body: await
|
|
1029
|
+
body: await parseErrorBody(output.body, context),
|
|
1030
1030
|
};
|
|
1031
1031
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1032
1032
|
switch (errorCode) {
|
|
@@ -1081,7 +1081,7 @@ exports.deserializeAws_restJson1EnableSharingWithAwsOrganizationCommand = deseri
|
|
|
1081
1081
|
const deserializeAws_restJson1EnableSharingWithAwsOrganizationCommandError = async (output, context) => {
|
|
1082
1082
|
const parsedOutput = {
|
|
1083
1083
|
...output,
|
|
1084
|
-
body: await
|
|
1084
|
+
body: await parseErrorBody(output.body, context),
|
|
1085
1085
|
};
|
|
1086
1086
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1087
1087
|
switch (errorCode) {
|
|
@@ -1121,7 +1121,7 @@ exports.deserializeAws_restJson1GetPermissionCommand = deserializeAws_restJson1G
|
|
|
1121
1121
|
const deserializeAws_restJson1GetPermissionCommandError = async (output, context) => {
|
|
1122
1122
|
const parsedOutput = {
|
|
1123
1123
|
...output,
|
|
1124
|
-
body: await
|
|
1124
|
+
body: await parseErrorBody(output.body, context),
|
|
1125
1125
|
};
|
|
1126
1126
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1127
1127
|
switch (errorCode) {
|
|
@@ -1173,7 +1173,7 @@ exports.deserializeAws_restJson1GetResourcePoliciesCommand = deserializeAws_rest
|
|
|
1173
1173
|
const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, context) => {
|
|
1174
1174
|
const parsedOutput = {
|
|
1175
1175
|
...output,
|
|
1176
|
-
body: await
|
|
1176
|
+
body: await parseErrorBody(output.body, context),
|
|
1177
1177
|
};
|
|
1178
1178
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1179
1179
|
switch (errorCode) {
|
|
@@ -1225,7 +1225,7 @@ exports.deserializeAws_restJson1GetResourceShareAssociationsCommand = deserializ
|
|
|
1225
1225
|
const deserializeAws_restJson1GetResourceShareAssociationsCommandError = async (output, context) => {
|
|
1226
1226
|
const parsedOutput = {
|
|
1227
1227
|
...output,
|
|
1228
|
-
body: await
|
|
1228
|
+
body: await parseErrorBody(output.body, context),
|
|
1229
1229
|
};
|
|
1230
1230
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1231
1231
|
switch (errorCode) {
|
|
@@ -1280,7 +1280,7 @@ exports.deserializeAws_restJson1GetResourceShareInvitationsCommand = deserialize
|
|
|
1280
1280
|
const deserializeAws_restJson1GetResourceShareInvitationsCommandError = async (output, context) => {
|
|
1281
1281
|
const parsedOutput = {
|
|
1282
1282
|
...output,
|
|
1283
|
-
body: await
|
|
1283
|
+
body: await parseErrorBody(output.body, context),
|
|
1284
1284
|
};
|
|
1285
1285
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1286
1286
|
switch (errorCode) {
|
|
@@ -1338,7 +1338,7 @@ exports.deserializeAws_restJson1GetResourceSharesCommand = deserializeAws_restJs
|
|
|
1338
1338
|
const deserializeAws_restJson1GetResourceSharesCommandError = async (output, context) => {
|
|
1339
1339
|
const parsedOutput = {
|
|
1340
1340
|
...output,
|
|
1341
|
-
body: await
|
|
1341
|
+
body: await parseErrorBody(output.body, context),
|
|
1342
1342
|
};
|
|
1343
1343
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1344
1344
|
switch (errorCode) {
|
|
@@ -1390,7 +1390,7 @@ exports.deserializeAws_restJson1ListPendingInvitationResourcesCommand = deserial
|
|
|
1390
1390
|
const deserializeAws_restJson1ListPendingInvitationResourcesCommandError = async (output, context) => {
|
|
1391
1391
|
const parsedOutput = {
|
|
1392
1392
|
...output,
|
|
1393
|
-
body: await
|
|
1393
|
+
body: await parseErrorBody(output.body, context),
|
|
1394
1394
|
};
|
|
1395
1395
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1396
1396
|
switch (errorCode) {
|
|
@@ -1451,7 +1451,7 @@ exports.deserializeAws_restJson1ListPermissionsCommand = deserializeAws_restJson
|
|
|
1451
1451
|
const deserializeAws_restJson1ListPermissionsCommandError = async (output, context) => {
|
|
1452
1452
|
const parsedOutput = {
|
|
1453
1453
|
...output,
|
|
1454
|
-
body: await
|
|
1454
|
+
body: await parseErrorBody(output.body, context),
|
|
1455
1455
|
};
|
|
1456
1456
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1457
1457
|
switch (errorCode) {
|
|
@@ -1500,7 +1500,7 @@ exports.deserializeAws_restJson1ListPermissionVersionsCommand = deserializeAws_r
|
|
|
1500
1500
|
const deserializeAws_restJson1ListPermissionVersionsCommandError = async (output, context) => {
|
|
1501
1501
|
const parsedOutput = {
|
|
1502
1502
|
...output,
|
|
1503
|
-
body: await
|
|
1503
|
+
body: await parseErrorBody(output.body, context),
|
|
1504
1504
|
};
|
|
1505
1505
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1506
1506
|
switch (errorCode) {
|
|
@@ -1555,7 +1555,7 @@ exports.deserializeAws_restJson1ListPrincipalsCommand = deserializeAws_restJson1
|
|
|
1555
1555
|
const deserializeAws_restJson1ListPrincipalsCommandError = async (output, context) => {
|
|
1556
1556
|
const parsedOutput = {
|
|
1557
1557
|
...output,
|
|
1558
|
-
body: await
|
|
1558
|
+
body: await parseErrorBody(output.body, context),
|
|
1559
1559
|
};
|
|
1560
1560
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1561
1561
|
switch (errorCode) {
|
|
@@ -1607,7 +1607,7 @@ exports.deserializeAws_restJson1ListResourcesCommand = deserializeAws_restJson1L
|
|
|
1607
1607
|
const deserializeAws_restJson1ListResourcesCommandError = async (output, context) => {
|
|
1608
1608
|
const parsedOutput = {
|
|
1609
1609
|
...output,
|
|
1610
|
-
body: await
|
|
1610
|
+
body: await parseErrorBody(output.body, context),
|
|
1611
1611
|
};
|
|
1612
1612
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1613
1613
|
switch (errorCode) {
|
|
@@ -1662,7 +1662,7 @@ exports.deserializeAws_restJson1ListResourceSharePermissionsCommand = deserializ
|
|
|
1662
1662
|
const deserializeAws_restJson1ListResourceSharePermissionsCommandError = async (output, context) => {
|
|
1663
1663
|
const parsedOutput = {
|
|
1664
1664
|
...output,
|
|
1665
|
-
body: await
|
|
1665
|
+
body: await parseErrorBody(output.body, context),
|
|
1666
1666
|
};
|
|
1667
1667
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1668
1668
|
switch (errorCode) {
|
|
@@ -1717,7 +1717,7 @@ exports.deserializeAws_restJson1ListResourceTypesCommand = deserializeAws_restJs
|
|
|
1717
1717
|
const deserializeAws_restJson1ListResourceTypesCommandError = async (output, context) => {
|
|
1718
1718
|
const parsedOutput = {
|
|
1719
1719
|
...output,
|
|
1720
|
-
body: await
|
|
1720
|
+
body: await parseErrorBody(output.body, context),
|
|
1721
1721
|
};
|
|
1722
1722
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1723
1723
|
switch (errorCode) {
|
|
@@ -1760,7 +1760,7 @@ exports.deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommand = d
|
|
|
1760
1760
|
const deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommandError = async (output, context) => {
|
|
1761
1761
|
const parsedOutput = {
|
|
1762
1762
|
...output,
|
|
1763
|
-
body: await
|
|
1763
|
+
body: await parseErrorBody(output.body, context),
|
|
1764
1764
|
};
|
|
1765
1765
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1766
1766
|
switch (errorCode) {
|
|
@@ -1818,7 +1818,7 @@ exports.deserializeAws_restJson1RejectResourceShareInvitationCommand = deseriali
|
|
|
1818
1818
|
const deserializeAws_restJson1RejectResourceShareInvitationCommandError = async (output, context) => {
|
|
1819
1819
|
const parsedOutput = {
|
|
1820
1820
|
...output,
|
|
1821
|
-
body: await
|
|
1821
|
+
body: await parseErrorBody(output.body, context),
|
|
1822
1822
|
};
|
|
1823
1823
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1824
1824
|
switch (errorCode) {
|
|
@@ -1876,7 +1876,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
1876
1876
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1877
1877
|
const parsedOutput = {
|
|
1878
1878
|
...output,
|
|
1879
|
-
body: await
|
|
1879
|
+
body: await parseErrorBody(output.body, context),
|
|
1880
1880
|
};
|
|
1881
1881
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1882
1882
|
switch (errorCode) {
|
|
@@ -1928,7 +1928,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
1928
1928
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1929
1929
|
const parsedOutput = {
|
|
1930
1930
|
...output,
|
|
1931
|
-
body: await
|
|
1931
|
+
body: await parseErrorBody(output.body, context),
|
|
1932
1932
|
};
|
|
1933
1933
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1934
1934
|
switch (errorCode) {
|
|
@@ -1971,7 +1971,7 @@ exports.deserializeAws_restJson1UpdateResourceShareCommand = deserializeAws_rest
|
|
|
1971
1971
|
const deserializeAws_restJson1UpdateResourceShareCommandError = async (output, context) => {
|
|
1972
1972
|
const parsedOutput = {
|
|
1973
1973
|
...output,
|
|
1974
|
-
body: await
|
|
1974
|
+
body: await parseErrorBody(output.body, context),
|
|
1975
1975
|
};
|
|
1976
1976
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1977
1977
|
switch (errorCode) {
|
|
@@ -2607,6 +2607,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
2607
2607
|
}
|
|
2608
2608
|
return {};
|
|
2609
2609
|
});
|
|
2610
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
2611
|
+
var _a;
|
|
2612
|
+
const value = await parseBody(errorBody, context);
|
|
2613
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2614
|
+
return value;
|
|
2615
|
+
};
|
|
2610
2616
|
const loadRestJsonErrorCode = (output, data) => {
|
|
2611
2617
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2612
2618
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -672,7 +672,7 @@ var deserializeAws_restJson1AcceptResourceShareInvitationCommandError = function
|
|
|
672
672
|
case 0:
|
|
673
673
|
_a = [__assign({}, output)];
|
|
674
674
|
_c = {};
|
|
675
|
-
return [4,
|
|
675
|
+
return [4, parseErrorBody(output.body, context)];
|
|
676
676
|
case 1:
|
|
677
677
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
678
678
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -767,7 +767,7 @@ var deserializeAws_restJson1AssociateResourceShareCommandError = function (outpu
|
|
|
767
767
|
case 0:
|
|
768
768
|
_a = [__assign({}, output)];
|
|
769
769
|
_c = {};
|
|
770
|
-
return [4,
|
|
770
|
+
return [4, parseErrorBody(output.body, context)];
|
|
771
771
|
case 1:
|
|
772
772
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
773
773
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -866,7 +866,7 @@ var deserializeAws_restJson1AssociateResourceSharePermissionCommandError = funct
|
|
|
866
866
|
case 0:
|
|
867
867
|
_a = [__assign({}, output)];
|
|
868
868
|
_c = {};
|
|
869
|
-
return [4,
|
|
869
|
+
return [4, parseErrorBody(output.body, context)];
|
|
870
870
|
case 1:
|
|
871
871
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
872
872
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -949,7 +949,7 @@ var deserializeAws_restJson1CreateResourceShareCommandError = function (output,
|
|
|
949
949
|
case 0:
|
|
950
950
|
_a = [__assign({}, output)];
|
|
951
951
|
_c = {};
|
|
952
|
-
return [4,
|
|
952
|
+
return [4, parseErrorBody(output.body, context)];
|
|
953
953
|
case 1:
|
|
954
954
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
955
955
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1048,7 +1048,7 @@ var deserializeAws_restJson1DeleteResourceShareCommandError = function (output,
|
|
|
1048
1048
|
case 0:
|
|
1049
1049
|
_a = [__assign({}, output)];
|
|
1050
1050
|
_c = {};
|
|
1051
|
-
return [4,
|
|
1051
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1052
1052
|
case 1:
|
|
1053
1053
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1054
1054
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1139,7 +1139,7 @@ var deserializeAws_restJson1DisassociateResourceShareCommandError = function (ou
|
|
|
1139
1139
|
case 0:
|
|
1140
1140
|
_a = [__assign({}, output)];
|
|
1141
1141
|
_c = {};
|
|
1142
|
-
return [4,
|
|
1142
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1143
1143
|
case 1:
|
|
1144
1144
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1145
1145
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1234,7 +1234,7 @@ var deserializeAws_restJson1DisassociateResourceSharePermissionCommandError = fu
|
|
|
1234
1234
|
case 0:
|
|
1235
1235
|
_a = [__assign({}, output)];
|
|
1236
1236
|
_c = {};
|
|
1237
|
-
return [4,
|
|
1237
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1238
1238
|
case 1:
|
|
1239
1239
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1240
1240
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1318,7 +1318,7 @@ var deserializeAws_restJson1EnableSharingWithAwsOrganizationCommandError = funct
|
|
|
1318
1318
|
case 0:
|
|
1319
1319
|
_a = [__assign({}, output)];
|
|
1320
1320
|
_c = {};
|
|
1321
|
-
return [4,
|
|
1321
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1322
1322
|
case 1:
|
|
1323
1323
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1324
1324
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1382,7 +1382,7 @@ var deserializeAws_restJson1GetPermissionCommandError = function (output, contex
|
|
|
1382
1382
|
case 0:
|
|
1383
1383
|
_a = [__assign({}, output)];
|
|
1384
1384
|
_c = {};
|
|
1385
|
-
return [4,
|
|
1385
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1386
1386
|
case 1:
|
|
1387
1387
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1388
1388
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1461,7 +1461,7 @@ var deserializeAws_restJson1GetResourcePoliciesCommandError = function (output,
|
|
|
1461
1461
|
case 0:
|
|
1462
1462
|
_a = [__assign({}, output)];
|
|
1463
1463
|
_c = {};
|
|
1464
|
-
return [4,
|
|
1464
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1465
1465
|
case 1:
|
|
1466
1466
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1467
1467
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1540,7 +1540,7 @@ var deserializeAws_restJson1GetResourceShareAssociationsCommandError = function
|
|
|
1540
1540
|
case 0:
|
|
1541
1541
|
_a = [__assign({}, output)];
|
|
1542
1542
|
_c = {};
|
|
1543
|
-
return [4,
|
|
1543
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1544
1544
|
case 1:
|
|
1545
1545
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1546
1546
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1623,7 +1623,7 @@ var deserializeAws_restJson1GetResourceShareInvitationsCommandError = function (
|
|
|
1623
1623
|
case 0:
|
|
1624
1624
|
_a = [__assign({}, output)];
|
|
1625
1625
|
_c = {};
|
|
1626
|
-
return [4,
|
|
1626
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1627
1627
|
case 1:
|
|
1628
1628
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1629
1629
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1710,7 +1710,7 @@ var deserializeAws_restJson1GetResourceSharesCommandError = function (output, co
|
|
|
1710
1710
|
case 0:
|
|
1711
1711
|
_a = [__assign({}, output)];
|
|
1712
1712
|
_c = {};
|
|
1713
|
-
return [4,
|
|
1713
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1714
1714
|
case 1:
|
|
1715
1715
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1716
1716
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1789,7 +1789,7 @@ var deserializeAws_restJson1ListPendingInvitationResourcesCommandError = functio
|
|
|
1789
1789
|
case 0:
|
|
1790
1790
|
_a = [__assign({}, output)];
|
|
1791
1791
|
_c = {};
|
|
1792
|
-
return [4,
|
|
1792
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1793
1793
|
case 1:
|
|
1794
1794
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1795
1795
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1880,7 +1880,7 @@ var deserializeAws_restJson1ListPermissionsCommandError = function (output, cont
|
|
|
1880
1880
|
case 0:
|
|
1881
1881
|
_a = [__assign({}, output)];
|
|
1882
1882
|
_c = {};
|
|
1883
|
-
return [4,
|
|
1883
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1884
1884
|
case 1:
|
|
1885
1885
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1886
1886
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1955,7 +1955,7 @@ var deserializeAws_restJson1ListPermissionVersionsCommandError = function (outpu
|
|
|
1955
1955
|
case 0:
|
|
1956
1956
|
_a = [__assign({}, output)];
|
|
1957
1957
|
_c = {};
|
|
1958
|
-
return [4,
|
|
1958
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1959
1959
|
case 1:
|
|
1960
1960
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1961
1961
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2038,7 +2038,7 @@ var deserializeAws_restJson1ListPrincipalsCommandError = function (output, conte
|
|
|
2038
2038
|
case 0:
|
|
2039
2039
|
_a = [__assign({}, output)];
|
|
2040
2040
|
_c = {};
|
|
2041
|
-
return [4,
|
|
2041
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2042
2042
|
case 1:
|
|
2043
2043
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2044
2044
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2117,7 +2117,7 @@ var deserializeAws_restJson1ListResourcesCommandError = function (output, contex
|
|
|
2117
2117
|
case 0:
|
|
2118
2118
|
_a = [__assign({}, output)];
|
|
2119
2119
|
_c = {};
|
|
2120
|
-
return [4,
|
|
2120
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2121
2121
|
case 1:
|
|
2122
2122
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2123
2123
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2200,7 +2200,7 @@ var deserializeAws_restJson1ListResourceSharePermissionsCommandError = function
|
|
|
2200
2200
|
case 0:
|
|
2201
2201
|
_a = [__assign({}, output)];
|
|
2202
2202
|
_c = {};
|
|
2203
|
-
return [4,
|
|
2203
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2204
2204
|
case 1:
|
|
2205
2205
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2206
2206
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2283,7 +2283,7 @@ var deserializeAws_restJson1ListResourceTypesCommandError = function (output, co
|
|
|
2283
2283
|
case 0:
|
|
2284
2284
|
_a = [__assign({}, output)];
|
|
2285
2285
|
_c = {};
|
|
2286
|
-
return [4,
|
|
2286
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2287
2287
|
case 1:
|
|
2288
2288
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2289
2289
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2351,7 +2351,7 @@ var deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommandError =
|
|
|
2351
2351
|
case 0:
|
|
2352
2352
|
_a = [__assign({}, output)];
|
|
2353
2353
|
_c = {};
|
|
2354
|
-
return [4,
|
|
2354
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2355
2355
|
case 1:
|
|
2356
2356
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2357
2357
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2438,7 +2438,7 @@ var deserializeAws_restJson1RejectResourceShareInvitationCommandError = function
|
|
|
2438
2438
|
case 0:
|
|
2439
2439
|
_a = [__assign({}, output)];
|
|
2440
2440
|
_c = {};
|
|
2441
|
-
return [4,
|
|
2441
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2442
2442
|
case 1:
|
|
2443
2443
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2444
2444
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2525,7 +2525,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
2525
2525
|
case 0:
|
|
2526
2526
|
_a = [__assign({}, output)];
|
|
2527
2527
|
_c = {};
|
|
2528
|
-
return [4,
|
|
2528
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2529
2529
|
case 1:
|
|
2530
2530
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2531
2531
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2604,7 +2604,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
2604
2604
|
case 0:
|
|
2605
2605
|
_a = [__assign({}, output)];
|
|
2606
2606
|
_c = {};
|
|
2607
|
-
return [4,
|
|
2607
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2608
2608
|
case 1:
|
|
2609
2609
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2610
2610
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2671,7 +2671,7 @@ var deserializeAws_restJson1UpdateResourceShareCommandError = function (output,
|
|
|
2671
2671
|
case 0:
|
|
2672
2672
|
_a = [__assign({}, output)];
|
|
2673
2673
|
_c = {};
|
|
2674
|
-
return [4,
|
|
2674
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2675
2675
|
case 1:
|
|
2676
2676
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2677
2677
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -3324,6 +3324,19 @@ var parseBody = function (streamBody, context) {
|
|
|
3324
3324
|
return {};
|
|
3325
3325
|
});
|
|
3326
3326
|
};
|
|
3327
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3328
|
+
var value;
|
|
3329
|
+
var _a;
|
|
3330
|
+
return __generator(this, function (_b) {
|
|
3331
|
+
switch (_b.label) {
|
|
3332
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
3333
|
+
case 1:
|
|
3334
|
+
value = _b.sent();
|
|
3335
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
3336
|
+
return [2, value];
|
|
3337
|
+
}
|
|
3338
|
+
});
|
|
3339
|
+
}); };
|
|
3327
3340
|
var loadRestJsonErrorCode = function (output, data) {
|
|
3328
3341
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
3329
3342
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ram",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ram 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",
|