@aws-sdk/client-braket 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 +19 -13
- package/dist-es/protocols/Aws_restJson1.js +26 -13
- 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-braket
|
|
@@ -327,7 +327,7 @@ exports.deserializeAws_restJson1CancelJobCommand = deserializeAws_restJson1Cance
|
|
|
327
327
|
const deserializeAws_restJson1CancelJobCommandError = async (output, context) => {
|
|
328
328
|
const parsedOutput = {
|
|
329
329
|
...output,
|
|
330
|
-
body: await
|
|
330
|
+
body: await parseErrorBody(output.body, context),
|
|
331
331
|
};
|
|
332
332
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
333
333
|
switch (errorCode) {
|
|
@@ -379,7 +379,7 @@ exports.deserializeAws_restJson1CancelQuantumTaskCommand = deserializeAws_restJs
|
|
|
379
379
|
const deserializeAws_restJson1CancelQuantumTaskCommandError = async (output, context) => {
|
|
380
380
|
const parsedOutput = {
|
|
381
381
|
...output,
|
|
382
|
-
body: await
|
|
382
|
+
body: await parseErrorBody(output.body, context),
|
|
383
383
|
};
|
|
384
384
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
385
385
|
switch (errorCode) {
|
|
@@ -428,7 +428,7 @@ exports.deserializeAws_restJson1CreateJobCommand = deserializeAws_restJson1Creat
|
|
|
428
428
|
const deserializeAws_restJson1CreateJobCommandError = async (output, context) => {
|
|
429
429
|
const parsedOutput = {
|
|
430
430
|
...output,
|
|
431
|
-
body: await
|
|
431
|
+
body: await parseErrorBody(output.body, context),
|
|
432
432
|
};
|
|
433
433
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
434
434
|
switch (errorCode) {
|
|
@@ -480,7 +480,7 @@ exports.deserializeAws_restJson1CreateQuantumTaskCommand = deserializeAws_restJs
|
|
|
480
480
|
const deserializeAws_restJson1CreateQuantumTaskCommandError = async (output, context) => {
|
|
481
481
|
const parsedOutput = {
|
|
482
482
|
...output,
|
|
483
|
-
body: await
|
|
483
|
+
body: await parseErrorBody(output.body, context),
|
|
484
484
|
};
|
|
485
485
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
486
486
|
switch (errorCode) {
|
|
@@ -547,7 +547,7 @@ exports.deserializeAws_restJson1GetDeviceCommand = deserializeAws_restJson1GetDe
|
|
|
547
547
|
const deserializeAws_restJson1GetDeviceCommandError = async (output, context) => {
|
|
548
548
|
const parsedOutput = {
|
|
549
549
|
...output,
|
|
550
|
-
body: await
|
|
550
|
+
body: await parseErrorBody(output.body, context),
|
|
551
551
|
};
|
|
552
552
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
553
553
|
switch (errorCode) {
|
|
@@ -647,7 +647,7 @@ exports.deserializeAws_restJson1GetJobCommand = deserializeAws_restJson1GetJobCo
|
|
|
647
647
|
const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
|
|
648
648
|
const parsedOutput = {
|
|
649
649
|
...output,
|
|
650
|
-
body: await
|
|
650
|
+
body: await parseErrorBody(output.body, context),
|
|
651
651
|
};
|
|
652
652
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
653
653
|
switch (errorCode) {
|
|
@@ -726,7 +726,7 @@ exports.deserializeAws_restJson1GetQuantumTaskCommand = deserializeAws_restJson1
|
|
|
726
726
|
const deserializeAws_restJson1GetQuantumTaskCommandError = async (output, context) => {
|
|
727
727
|
const parsedOutput = {
|
|
728
728
|
...output,
|
|
729
|
-
body: await
|
|
729
|
+
body: await parseErrorBody(output.body, context),
|
|
730
730
|
};
|
|
731
731
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
732
732
|
switch (errorCode) {
|
|
@@ -772,7 +772,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
|
|
|
772
772
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
773
773
|
const parsedOutput = {
|
|
774
774
|
...output,
|
|
775
|
-
body: await
|
|
775
|
+
body: await parseErrorBody(output.body, context),
|
|
776
776
|
};
|
|
777
777
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
778
778
|
switch (errorCode) {
|
|
@@ -815,7 +815,7 @@ exports.deserializeAws_restJson1SearchDevicesCommand = deserializeAws_restJson1S
|
|
|
815
815
|
const deserializeAws_restJson1SearchDevicesCommandError = async (output, context) => {
|
|
816
816
|
const parsedOutput = {
|
|
817
817
|
...output,
|
|
818
|
-
body: await
|
|
818
|
+
body: await parseErrorBody(output.body, context),
|
|
819
819
|
};
|
|
820
820
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
821
821
|
switch (errorCode) {
|
|
@@ -861,7 +861,7 @@ exports.deserializeAws_restJson1SearchJobsCommand = deserializeAws_restJson1Sear
|
|
|
861
861
|
const deserializeAws_restJson1SearchJobsCommandError = async (output, context) => {
|
|
862
862
|
const parsedOutput = {
|
|
863
863
|
...output,
|
|
864
|
-
body: await
|
|
864
|
+
body: await parseErrorBody(output.body, context),
|
|
865
865
|
};
|
|
866
866
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
867
867
|
switch (errorCode) {
|
|
@@ -907,7 +907,7 @@ exports.deserializeAws_restJson1SearchQuantumTasksCommand = deserializeAws_restJ
|
|
|
907
907
|
const deserializeAws_restJson1SearchQuantumTasksCommandError = async (output, context) => {
|
|
908
908
|
const parsedOutput = {
|
|
909
909
|
...output,
|
|
910
|
-
body: await
|
|
910
|
+
body: await parseErrorBody(output.body, context),
|
|
911
911
|
};
|
|
912
912
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
913
913
|
switch (errorCode) {
|
|
@@ -947,7 +947,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
947
947
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
948
948
|
const parsedOutput = {
|
|
949
949
|
...output,
|
|
950
|
-
body: await
|
|
950
|
+
body: await parseErrorBody(output.body, context),
|
|
951
951
|
};
|
|
952
952
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
953
953
|
switch (errorCode) {
|
|
@@ -984,7 +984,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
984
984
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
985
985
|
const parsedOutput = {
|
|
986
986
|
...output,
|
|
987
|
-
body: await
|
|
987
|
+
body: await parseErrorBody(output.body, context),
|
|
988
988
|
};
|
|
989
989
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
990
990
|
switch (errorCode) {
|
|
@@ -1476,6 +1476,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1476
1476
|
}
|
|
1477
1477
|
return {};
|
|
1478
1478
|
});
|
|
1479
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1480
|
+
var _a;
|
|
1481
|
+
const value = await parseBody(errorBody, context);
|
|
1482
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1483
|
+
return value;
|
|
1484
|
+
};
|
|
1479
1485
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1480
1486
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1481
1487
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -367,7 +367,7 @@ var deserializeAws_restJson1CancelJobCommandError = function (output, context) {
|
|
|
367
367
|
case 0:
|
|
368
368
|
_a = [__assign({}, output)];
|
|
369
369
|
_c = {};
|
|
370
|
-
return [4,
|
|
370
|
+
return [4, parseErrorBody(output.body, context)];
|
|
371
371
|
case 1:
|
|
372
372
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
373
373
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -446,7 +446,7 @@ var deserializeAws_restJson1CancelQuantumTaskCommandError = function (output, co
|
|
|
446
446
|
case 0:
|
|
447
447
|
_a = [__assign({}, output)];
|
|
448
448
|
_c = {};
|
|
449
|
-
return [4,
|
|
449
|
+
return [4, parseErrorBody(output.body, context)];
|
|
450
450
|
case 1:
|
|
451
451
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
452
452
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -522,7 +522,7 @@ var deserializeAws_restJson1CreateJobCommandError = function (output, context) {
|
|
|
522
522
|
case 0:
|
|
523
523
|
_a = [__assign({}, output)];
|
|
524
524
|
_c = {};
|
|
525
|
-
return [4,
|
|
525
|
+
return [4, parseErrorBody(output.body, context)];
|
|
526
526
|
case 1:
|
|
527
527
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
528
528
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -602,7 +602,7 @@ var deserializeAws_restJson1CreateQuantumTaskCommandError = function (output, co
|
|
|
602
602
|
case 0:
|
|
603
603
|
_a = [__assign({}, output)];
|
|
604
604
|
_c = {};
|
|
605
|
-
return [4,
|
|
605
|
+
return [4, parseErrorBody(output.body, context)];
|
|
606
606
|
case 1:
|
|
607
607
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
608
608
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -697,7 +697,7 @@ var deserializeAws_restJson1GetDeviceCommandError = function (output, context) {
|
|
|
697
697
|
case 0:
|
|
698
698
|
_a = [__assign({}, output)];
|
|
699
699
|
_c = {};
|
|
700
|
-
return [4,
|
|
700
|
+
return [4, parseErrorBody(output.body, context)];
|
|
701
701
|
case 1:
|
|
702
702
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
703
703
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -823,7 +823,7 @@ var deserializeAws_restJson1GetJobCommandError = function (output, context) { re
|
|
|
823
823
|
case 0:
|
|
824
824
|
_a = [__assign({}, output)];
|
|
825
825
|
_c = {};
|
|
826
|
-
return [4,
|
|
826
|
+
return [4, parseErrorBody(output.body, context)];
|
|
827
827
|
case 1:
|
|
828
828
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
829
829
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -928,7 +928,7 @@ var deserializeAws_restJson1GetQuantumTaskCommandError = function (output, conte
|
|
|
928
928
|
case 0:
|
|
929
929
|
_a = [__assign({}, output)];
|
|
930
930
|
_c = {};
|
|
931
|
-
return [4,
|
|
931
|
+
return [4, parseErrorBody(output.body, context)];
|
|
932
932
|
case 1:
|
|
933
933
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
934
934
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1000,7 +1000,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1000
1000
|
case 0:
|
|
1001
1001
|
_a = [__assign({}, output)];
|
|
1002
1002
|
_c = {};
|
|
1003
|
-
return [4,
|
|
1003
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1004
1004
|
case 1:
|
|
1005
1005
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1006
1006
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1067,7 +1067,7 @@ var deserializeAws_restJson1SearchDevicesCommandError = function (output, contex
|
|
|
1067
1067
|
case 0:
|
|
1068
1068
|
_a = [__assign({}, output)];
|
|
1069
1069
|
_c = {};
|
|
1070
|
-
return [4,
|
|
1070
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1071
1071
|
case 1:
|
|
1072
1072
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1073
1073
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1138,7 +1138,7 @@ var deserializeAws_restJson1SearchJobsCommandError = function (output, context)
|
|
|
1138
1138
|
case 0:
|
|
1139
1139
|
_a = [__assign({}, output)];
|
|
1140
1140
|
_c = {};
|
|
1141
|
-
return [4,
|
|
1141
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1142
1142
|
case 1:
|
|
1143
1143
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1144
1144
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1209,7 +1209,7 @@ var deserializeAws_restJson1SearchQuantumTasksCommandError = function (output, c
|
|
|
1209
1209
|
case 0:
|
|
1210
1210
|
_a = [__assign({}, output)];
|
|
1211
1211
|
_c = {};
|
|
1212
|
-
return [4,
|
|
1212
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1213
1213
|
case 1:
|
|
1214
1214
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1215
1215
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1272,7 +1272,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1272
1272
|
case 0:
|
|
1273
1273
|
_a = [__assign({}, output)];
|
|
1274
1274
|
_c = {};
|
|
1275
|
-
return [4,
|
|
1275
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1276
1276
|
case 1:
|
|
1277
1277
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1278
1278
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1331,7 +1331,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
1331
1331
|
case 0:
|
|
1332
1332
|
_a = [__assign({}, output)];
|
|
1333
1333
|
_c = {};
|
|
1334
|
-
return [4,
|
|
1334
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1335
1335
|
case 1:
|
|
1336
1336
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1337
1337
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1794,6 +1794,19 @@ var parseBody = function (streamBody, context) {
|
|
|
1794
1794
|
return {};
|
|
1795
1795
|
});
|
|
1796
1796
|
};
|
|
1797
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1798
|
+
var value;
|
|
1799
|
+
var _a;
|
|
1800
|
+
return __generator(this, function (_b) {
|
|
1801
|
+
switch (_b.label) {
|
|
1802
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1803
|
+
case 1:
|
|
1804
|
+
value = _b.sent();
|
|
1805
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1806
|
+
return [2, value];
|
|
1807
|
+
}
|
|
1808
|
+
});
|
|
1809
|
+
}); };
|
|
1797
1810
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1798
1811
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1799
1812
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-braket",
|
|
3
3
|
"description": "AWS SDK for JavaScript Braket 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",
|