@aws-sdk/client-athena 3.50.0 → 3.53.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 +30 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/AthenaServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +77 -3
- package/dist-cjs/protocols/Aws_json1_1.js +267 -856
- package/dist-es/index.js +1 -0
- package/dist-es/models/AthenaServiceException.js +12 -0
- package/dist-es/models/models_0.js +70 -1
- package/dist-es/protocols/Aws_json1_1.js +619 -983
- package/dist-types/Athena.d.ts +0 -6
- package/dist-types/commands/GetQueryResultsCommand.d.ts +0 -6
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/AthenaServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +52 -25
- package/dist-types/ts3.4/Athena.d.ts +175 -0
- package/dist-types/ts3.4/AthenaClient.d.ts +107 -0
- package/dist-types/ts3.4/commands/BatchGetNamedQueryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/BatchGetQueryExecutionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateDataCatalogCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateNamedQueryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreatePreparedStatementCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateWorkGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteDataCatalogCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteNamedQueryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeletePreparedStatementCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteWorkGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDataCatalogCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDatabaseCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetNamedQueryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetPreparedStatementCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetQueryExecutionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetQueryResultsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetTableMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetWorkGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDataCatalogsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDatabasesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListEngineVersionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListNamedQueriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListPreparedStatementsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListQueryExecutionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTableMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListWorkGroupsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartQueryExecutionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopQueryExecutionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateDataCatalogCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdatePreparedStatementCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateWorkGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +34 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/AthenaServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1180 -0
- package/dist-types/ts3.4/pagination/GetQueryResultsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListDataCatalogsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListDatabasesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListNamedQueriesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListPreparedStatementsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListQueryExecutionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListTableMetadataPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListWorkGroupsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +10 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
|
@@ -5,6 +5,8 @@ exports.deserializeAws_json1_1UpdateWorkGroupCommand = exports.deserializeAws_js
|
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
8
|
+
const AthenaServiceException_1 = require("../models/AthenaServiceException");
|
|
9
|
+
const models_0_1 = require("../models/models_0");
|
|
8
10
|
const serializeAws_json1_1BatchGetNamedQueryCommand = async (input, context) => {
|
|
9
11
|
const headers = {
|
|
10
12
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -370,35 +372,19 @@ const deserializeAws_json1_1BatchGetNamedQueryCommandError = async (output, cont
|
|
|
370
372
|
switch (errorCode) {
|
|
371
373
|
case "InternalServerException":
|
|
372
374
|
case "com.amazonaws.athena#InternalServerException":
|
|
373
|
-
|
|
374
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
375
|
-
name: errorCode,
|
|
376
|
-
$metadata: deserializeMetadata(output),
|
|
377
|
-
};
|
|
378
|
-
break;
|
|
375
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
379
376
|
case "InvalidRequestException":
|
|
380
377
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
381
|
-
|
|
382
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
383
|
-
name: errorCode,
|
|
384
|
-
$metadata: deserializeMetadata(output),
|
|
385
|
-
};
|
|
386
|
-
break;
|
|
378
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
387
379
|
default:
|
|
388
380
|
const parsedBody = parsedOutput.body;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
...parsedBody,
|
|
392
|
-
name: `${errorCode}`,
|
|
393
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
381
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
382
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
394
383
|
$fault: "client",
|
|
395
384
|
$metadata: deserializeMetadata(output),
|
|
396
|
-
};
|
|
385
|
+
});
|
|
386
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
397
387
|
}
|
|
398
|
-
const message = response.message || response.Message || errorCode;
|
|
399
|
-
response.message = message;
|
|
400
|
-
delete response.Message;
|
|
401
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
402
388
|
};
|
|
403
389
|
const deserializeAws_json1_1BatchGetQueryExecutionCommand = async (output, context) => {
|
|
404
390
|
if (output.statusCode >= 300) {
|
|
@@ -425,35 +411,19 @@ const deserializeAws_json1_1BatchGetQueryExecutionCommandError = async (output,
|
|
|
425
411
|
switch (errorCode) {
|
|
426
412
|
case "InternalServerException":
|
|
427
413
|
case "com.amazonaws.athena#InternalServerException":
|
|
428
|
-
|
|
429
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
430
|
-
name: errorCode,
|
|
431
|
-
$metadata: deserializeMetadata(output),
|
|
432
|
-
};
|
|
433
|
-
break;
|
|
414
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
434
415
|
case "InvalidRequestException":
|
|
435
416
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
436
|
-
|
|
437
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
438
|
-
name: errorCode,
|
|
439
|
-
$metadata: deserializeMetadata(output),
|
|
440
|
-
};
|
|
441
|
-
break;
|
|
417
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
442
418
|
default:
|
|
443
419
|
const parsedBody = parsedOutput.body;
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
...parsedBody,
|
|
447
|
-
name: `${errorCode}`,
|
|
448
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
420
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
421
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
449
422
|
$fault: "client",
|
|
450
423
|
$metadata: deserializeMetadata(output),
|
|
451
|
-
};
|
|
424
|
+
});
|
|
425
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
452
426
|
}
|
|
453
|
-
const message = response.message || response.Message || errorCode;
|
|
454
|
-
response.message = message;
|
|
455
|
-
delete response.Message;
|
|
456
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
457
427
|
};
|
|
458
428
|
const deserializeAws_json1_1CreateDataCatalogCommand = async (output, context) => {
|
|
459
429
|
if (output.statusCode >= 300) {
|
|
@@ -480,35 +450,19 @@ const deserializeAws_json1_1CreateDataCatalogCommandError = async (output, conte
|
|
|
480
450
|
switch (errorCode) {
|
|
481
451
|
case "InternalServerException":
|
|
482
452
|
case "com.amazonaws.athena#InternalServerException":
|
|
483
|
-
|
|
484
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
485
|
-
name: errorCode,
|
|
486
|
-
$metadata: deserializeMetadata(output),
|
|
487
|
-
};
|
|
488
|
-
break;
|
|
453
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
489
454
|
case "InvalidRequestException":
|
|
490
455
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
491
|
-
|
|
492
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
493
|
-
name: errorCode,
|
|
494
|
-
$metadata: deserializeMetadata(output),
|
|
495
|
-
};
|
|
496
|
-
break;
|
|
456
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
497
457
|
default:
|
|
498
458
|
const parsedBody = parsedOutput.body;
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
...parsedBody,
|
|
502
|
-
name: `${errorCode}`,
|
|
503
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
459
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
460
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
504
461
|
$fault: "client",
|
|
505
462
|
$metadata: deserializeMetadata(output),
|
|
506
|
-
};
|
|
463
|
+
});
|
|
464
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
507
465
|
}
|
|
508
|
-
const message = response.message || response.Message || errorCode;
|
|
509
|
-
response.message = message;
|
|
510
|
-
delete response.Message;
|
|
511
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
512
466
|
};
|
|
513
467
|
const deserializeAws_json1_1CreateNamedQueryCommand = async (output, context) => {
|
|
514
468
|
if (output.statusCode >= 300) {
|
|
@@ -535,35 +489,19 @@ const deserializeAws_json1_1CreateNamedQueryCommandError = async (output, contex
|
|
|
535
489
|
switch (errorCode) {
|
|
536
490
|
case "InternalServerException":
|
|
537
491
|
case "com.amazonaws.athena#InternalServerException":
|
|
538
|
-
|
|
539
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
540
|
-
name: errorCode,
|
|
541
|
-
$metadata: deserializeMetadata(output),
|
|
542
|
-
};
|
|
543
|
-
break;
|
|
492
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
544
493
|
case "InvalidRequestException":
|
|
545
494
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
546
|
-
|
|
547
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
548
|
-
name: errorCode,
|
|
549
|
-
$metadata: deserializeMetadata(output),
|
|
550
|
-
};
|
|
551
|
-
break;
|
|
495
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
552
496
|
default:
|
|
553
497
|
const parsedBody = parsedOutput.body;
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
...parsedBody,
|
|
557
|
-
name: `${errorCode}`,
|
|
558
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
498
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
499
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
559
500
|
$fault: "client",
|
|
560
501
|
$metadata: deserializeMetadata(output),
|
|
561
|
-
};
|
|
502
|
+
});
|
|
503
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
562
504
|
}
|
|
563
|
-
const message = response.message || response.Message || errorCode;
|
|
564
|
-
response.message = message;
|
|
565
|
-
delete response.Message;
|
|
566
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
567
505
|
};
|
|
568
506
|
const deserializeAws_json1_1CreatePreparedStatementCommand = async (output, context) => {
|
|
569
507
|
if (output.statusCode >= 300) {
|
|
@@ -590,35 +528,19 @@ const deserializeAws_json1_1CreatePreparedStatementCommandError = async (output,
|
|
|
590
528
|
switch (errorCode) {
|
|
591
529
|
case "InternalServerException":
|
|
592
530
|
case "com.amazonaws.athena#InternalServerException":
|
|
593
|
-
|
|
594
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
595
|
-
name: errorCode,
|
|
596
|
-
$metadata: deserializeMetadata(output),
|
|
597
|
-
};
|
|
598
|
-
break;
|
|
531
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
599
532
|
case "InvalidRequestException":
|
|
600
533
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
601
|
-
|
|
602
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
603
|
-
name: errorCode,
|
|
604
|
-
$metadata: deserializeMetadata(output),
|
|
605
|
-
};
|
|
606
|
-
break;
|
|
534
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
607
535
|
default:
|
|
608
536
|
const parsedBody = parsedOutput.body;
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
...parsedBody,
|
|
612
|
-
name: `${errorCode}`,
|
|
613
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
537
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
538
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
614
539
|
$fault: "client",
|
|
615
540
|
$metadata: deserializeMetadata(output),
|
|
616
|
-
};
|
|
541
|
+
});
|
|
542
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
617
543
|
}
|
|
618
|
-
const message = response.message || response.Message || errorCode;
|
|
619
|
-
response.message = message;
|
|
620
|
-
delete response.Message;
|
|
621
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
622
544
|
};
|
|
623
545
|
const deserializeAws_json1_1CreateWorkGroupCommand = async (output, context) => {
|
|
624
546
|
if (output.statusCode >= 300) {
|
|
@@ -645,35 +567,19 @@ const deserializeAws_json1_1CreateWorkGroupCommandError = async (output, context
|
|
|
645
567
|
switch (errorCode) {
|
|
646
568
|
case "InternalServerException":
|
|
647
569
|
case "com.amazonaws.athena#InternalServerException":
|
|
648
|
-
|
|
649
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
650
|
-
name: errorCode,
|
|
651
|
-
$metadata: deserializeMetadata(output),
|
|
652
|
-
};
|
|
653
|
-
break;
|
|
570
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
654
571
|
case "InvalidRequestException":
|
|
655
572
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
656
|
-
|
|
657
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
658
|
-
name: errorCode,
|
|
659
|
-
$metadata: deserializeMetadata(output),
|
|
660
|
-
};
|
|
661
|
-
break;
|
|
573
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
662
574
|
default:
|
|
663
575
|
const parsedBody = parsedOutput.body;
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
...parsedBody,
|
|
667
|
-
name: `${errorCode}`,
|
|
668
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
576
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
577
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
669
578
|
$fault: "client",
|
|
670
579
|
$metadata: deserializeMetadata(output),
|
|
671
|
-
};
|
|
580
|
+
});
|
|
581
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
672
582
|
}
|
|
673
|
-
const message = response.message || response.Message || errorCode;
|
|
674
|
-
response.message = message;
|
|
675
|
-
delete response.Message;
|
|
676
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
677
583
|
};
|
|
678
584
|
const deserializeAws_json1_1DeleteDataCatalogCommand = async (output, context) => {
|
|
679
585
|
if (output.statusCode >= 300) {
|
|
@@ -700,35 +606,19 @@ const deserializeAws_json1_1DeleteDataCatalogCommandError = async (output, conte
|
|
|
700
606
|
switch (errorCode) {
|
|
701
607
|
case "InternalServerException":
|
|
702
608
|
case "com.amazonaws.athena#InternalServerException":
|
|
703
|
-
|
|
704
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
705
|
-
name: errorCode,
|
|
706
|
-
$metadata: deserializeMetadata(output),
|
|
707
|
-
};
|
|
708
|
-
break;
|
|
609
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
709
610
|
case "InvalidRequestException":
|
|
710
611
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
711
|
-
|
|
712
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
713
|
-
name: errorCode,
|
|
714
|
-
$metadata: deserializeMetadata(output),
|
|
715
|
-
};
|
|
716
|
-
break;
|
|
612
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
717
613
|
default:
|
|
718
614
|
const parsedBody = parsedOutput.body;
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
...parsedBody,
|
|
722
|
-
name: `${errorCode}`,
|
|
723
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
615
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
616
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
724
617
|
$fault: "client",
|
|
725
618
|
$metadata: deserializeMetadata(output),
|
|
726
|
-
};
|
|
619
|
+
});
|
|
620
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
727
621
|
}
|
|
728
|
-
const message = response.message || response.Message || errorCode;
|
|
729
|
-
response.message = message;
|
|
730
|
-
delete response.Message;
|
|
731
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
732
622
|
};
|
|
733
623
|
const deserializeAws_json1_1DeleteNamedQueryCommand = async (output, context) => {
|
|
734
624
|
if (output.statusCode >= 300) {
|
|
@@ -755,35 +645,19 @@ const deserializeAws_json1_1DeleteNamedQueryCommandError = async (output, contex
|
|
|
755
645
|
switch (errorCode) {
|
|
756
646
|
case "InternalServerException":
|
|
757
647
|
case "com.amazonaws.athena#InternalServerException":
|
|
758
|
-
|
|
759
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
760
|
-
name: errorCode,
|
|
761
|
-
$metadata: deserializeMetadata(output),
|
|
762
|
-
};
|
|
763
|
-
break;
|
|
648
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
764
649
|
case "InvalidRequestException":
|
|
765
650
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
766
|
-
|
|
767
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
768
|
-
name: errorCode,
|
|
769
|
-
$metadata: deserializeMetadata(output),
|
|
770
|
-
};
|
|
771
|
-
break;
|
|
651
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
772
652
|
default:
|
|
773
653
|
const parsedBody = parsedOutput.body;
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
...parsedBody,
|
|
777
|
-
name: `${errorCode}`,
|
|
778
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
654
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
655
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
779
656
|
$fault: "client",
|
|
780
657
|
$metadata: deserializeMetadata(output),
|
|
781
|
-
};
|
|
658
|
+
});
|
|
659
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
782
660
|
}
|
|
783
|
-
const message = response.message || response.Message || errorCode;
|
|
784
|
-
response.message = message;
|
|
785
|
-
delete response.Message;
|
|
786
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
787
661
|
};
|
|
788
662
|
const deserializeAws_json1_1DeletePreparedStatementCommand = async (output, context) => {
|
|
789
663
|
if (output.statusCode >= 300) {
|
|
@@ -810,43 +684,22 @@ const deserializeAws_json1_1DeletePreparedStatementCommandError = async (output,
|
|
|
810
684
|
switch (errorCode) {
|
|
811
685
|
case "InternalServerException":
|
|
812
686
|
case "com.amazonaws.athena#InternalServerException":
|
|
813
|
-
|
|
814
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
815
|
-
name: errorCode,
|
|
816
|
-
$metadata: deserializeMetadata(output),
|
|
817
|
-
};
|
|
818
|
-
break;
|
|
687
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
819
688
|
case "InvalidRequestException":
|
|
820
689
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
821
|
-
|
|
822
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
823
|
-
name: errorCode,
|
|
824
|
-
$metadata: deserializeMetadata(output),
|
|
825
|
-
};
|
|
826
|
-
break;
|
|
690
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
827
691
|
case "ResourceNotFoundException":
|
|
828
692
|
case "com.amazonaws.athena#ResourceNotFoundException":
|
|
829
|
-
|
|
830
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
831
|
-
name: errorCode,
|
|
832
|
-
$metadata: deserializeMetadata(output),
|
|
833
|
-
};
|
|
834
|
-
break;
|
|
693
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
835
694
|
default:
|
|
836
695
|
const parsedBody = parsedOutput.body;
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
...parsedBody,
|
|
840
|
-
name: `${errorCode}`,
|
|
841
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
696
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
697
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
842
698
|
$fault: "client",
|
|
843
699
|
$metadata: deserializeMetadata(output),
|
|
844
|
-
};
|
|
700
|
+
});
|
|
701
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
845
702
|
}
|
|
846
|
-
const message = response.message || response.Message || errorCode;
|
|
847
|
-
response.message = message;
|
|
848
|
-
delete response.Message;
|
|
849
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
850
703
|
};
|
|
851
704
|
const deserializeAws_json1_1DeleteWorkGroupCommand = async (output, context) => {
|
|
852
705
|
if (output.statusCode >= 300) {
|
|
@@ -873,35 +726,19 @@ const deserializeAws_json1_1DeleteWorkGroupCommandError = async (output, context
|
|
|
873
726
|
switch (errorCode) {
|
|
874
727
|
case "InternalServerException":
|
|
875
728
|
case "com.amazonaws.athena#InternalServerException":
|
|
876
|
-
|
|
877
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
878
|
-
name: errorCode,
|
|
879
|
-
$metadata: deserializeMetadata(output),
|
|
880
|
-
};
|
|
881
|
-
break;
|
|
729
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
882
730
|
case "InvalidRequestException":
|
|
883
731
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
884
|
-
|
|
885
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
886
|
-
name: errorCode,
|
|
887
|
-
$metadata: deserializeMetadata(output),
|
|
888
|
-
};
|
|
889
|
-
break;
|
|
732
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
890
733
|
default:
|
|
891
734
|
const parsedBody = parsedOutput.body;
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
...parsedBody,
|
|
895
|
-
name: `${errorCode}`,
|
|
896
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
735
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
736
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
897
737
|
$fault: "client",
|
|
898
738
|
$metadata: deserializeMetadata(output),
|
|
899
|
-
};
|
|
739
|
+
});
|
|
740
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
900
741
|
}
|
|
901
|
-
const message = response.message || response.Message || errorCode;
|
|
902
|
-
response.message = message;
|
|
903
|
-
delete response.Message;
|
|
904
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
905
742
|
};
|
|
906
743
|
const deserializeAws_json1_1GetDatabaseCommand = async (output, context) => {
|
|
907
744
|
if (output.statusCode >= 300) {
|
|
@@ -928,43 +765,22 @@ const deserializeAws_json1_1GetDatabaseCommandError = async (output, context) =>
|
|
|
928
765
|
switch (errorCode) {
|
|
929
766
|
case "InternalServerException":
|
|
930
767
|
case "com.amazonaws.athena#InternalServerException":
|
|
931
|
-
|
|
932
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
933
|
-
name: errorCode,
|
|
934
|
-
$metadata: deserializeMetadata(output),
|
|
935
|
-
};
|
|
936
|
-
break;
|
|
768
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
937
769
|
case "InvalidRequestException":
|
|
938
770
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
939
|
-
|
|
940
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
941
|
-
name: errorCode,
|
|
942
|
-
$metadata: deserializeMetadata(output),
|
|
943
|
-
};
|
|
944
|
-
break;
|
|
771
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
945
772
|
case "MetadataException":
|
|
946
773
|
case "com.amazonaws.athena#MetadataException":
|
|
947
|
-
|
|
948
|
-
...(await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context)),
|
|
949
|
-
name: errorCode,
|
|
950
|
-
$metadata: deserializeMetadata(output),
|
|
951
|
-
};
|
|
952
|
-
break;
|
|
774
|
+
throw await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context);
|
|
953
775
|
default:
|
|
954
776
|
const parsedBody = parsedOutput.body;
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
...parsedBody,
|
|
958
|
-
name: `${errorCode}`,
|
|
959
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
777
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
778
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
960
779
|
$fault: "client",
|
|
961
780
|
$metadata: deserializeMetadata(output),
|
|
962
|
-
};
|
|
781
|
+
});
|
|
782
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
963
783
|
}
|
|
964
|
-
const message = response.message || response.Message || errorCode;
|
|
965
|
-
response.message = message;
|
|
966
|
-
delete response.Message;
|
|
967
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
968
784
|
};
|
|
969
785
|
const deserializeAws_json1_1GetDataCatalogCommand = async (output, context) => {
|
|
970
786
|
if (output.statusCode >= 300) {
|
|
@@ -991,35 +807,19 @@ const deserializeAws_json1_1GetDataCatalogCommandError = async (output, context)
|
|
|
991
807
|
switch (errorCode) {
|
|
992
808
|
case "InternalServerException":
|
|
993
809
|
case "com.amazonaws.athena#InternalServerException":
|
|
994
|
-
|
|
995
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
996
|
-
name: errorCode,
|
|
997
|
-
$metadata: deserializeMetadata(output),
|
|
998
|
-
};
|
|
999
|
-
break;
|
|
810
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1000
811
|
case "InvalidRequestException":
|
|
1001
812
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1002
|
-
|
|
1003
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1004
|
-
name: errorCode,
|
|
1005
|
-
$metadata: deserializeMetadata(output),
|
|
1006
|
-
};
|
|
1007
|
-
break;
|
|
813
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1008
814
|
default:
|
|
1009
815
|
const parsedBody = parsedOutput.body;
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
...parsedBody,
|
|
1013
|
-
name: `${errorCode}`,
|
|
1014
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
816
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
817
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1015
818
|
$fault: "client",
|
|
1016
819
|
$metadata: deserializeMetadata(output),
|
|
1017
|
-
};
|
|
820
|
+
});
|
|
821
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1018
822
|
}
|
|
1019
|
-
const message = response.message || response.Message || errorCode;
|
|
1020
|
-
response.message = message;
|
|
1021
|
-
delete response.Message;
|
|
1022
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1023
823
|
};
|
|
1024
824
|
const deserializeAws_json1_1GetNamedQueryCommand = async (output, context) => {
|
|
1025
825
|
if (output.statusCode >= 300) {
|
|
@@ -1046,35 +846,19 @@ const deserializeAws_json1_1GetNamedQueryCommandError = async (output, context)
|
|
|
1046
846
|
switch (errorCode) {
|
|
1047
847
|
case "InternalServerException":
|
|
1048
848
|
case "com.amazonaws.athena#InternalServerException":
|
|
1049
|
-
|
|
1050
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1051
|
-
name: errorCode,
|
|
1052
|
-
$metadata: deserializeMetadata(output),
|
|
1053
|
-
};
|
|
1054
|
-
break;
|
|
849
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1055
850
|
case "InvalidRequestException":
|
|
1056
851
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1057
|
-
|
|
1058
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1059
|
-
name: errorCode,
|
|
1060
|
-
$metadata: deserializeMetadata(output),
|
|
1061
|
-
};
|
|
1062
|
-
break;
|
|
852
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1063
853
|
default:
|
|
1064
854
|
const parsedBody = parsedOutput.body;
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
...parsedBody,
|
|
1068
|
-
name: `${errorCode}`,
|
|
1069
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
855
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
856
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1070
857
|
$fault: "client",
|
|
1071
858
|
$metadata: deserializeMetadata(output),
|
|
1072
|
-
};
|
|
859
|
+
});
|
|
860
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1073
861
|
}
|
|
1074
|
-
const message = response.message || response.Message || errorCode;
|
|
1075
|
-
response.message = message;
|
|
1076
|
-
delete response.Message;
|
|
1077
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1078
862
|
};
|
|
1079
863
|
const deserializeAws_json1_1GetPreparedStatementCommand = async (output, context) => {
|
|
1080
864
|
if (output.statusCode >= 300) {
|
|
@@ -1101,43 +885,22 @@ const deserializeAws_json1_1GetPreparedStatementCommandError = async (output, co
|
|
|
1101
885
|
switch (errorCode) {
|
|
1102
886
|
case "InternalServerException":
|
|
1103
887
|
case "com.amazonaws.athena#InternalServerException":
|
|
1104
|
-
|
|
1105
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1106
|
-
name: errorCode,
|
|
1107
|
-
$metadata: deserializeMetadata(output),
|
|
1108
|
-
};
|
|
1109
|
-
break;
|
|
888
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1110
889
|
case "InvalidRequestException":
|
|
1111
890
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1112
|
-
|
|
1113
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1114
|
-
name: errorCode,
|
|
1115
|
-
$metadata: deserializeMetadata(output),
|
|
1116
|
-
};
|
|
1117
|
-
break;
|
|
891
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1118
892
|
case "ResourceNotFoundException":
|
|
1119
893
|
case "com.amazonaws.athena#ResourceNotFoundException":
|
|
1120
|
-
|
|
1121
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1122
|
-
name: errorCode,
|
|
1123
|
-
$metadata: deserializeMetadata(output),
|
|
1124
|
-
};
|
|
1125
|
-
break;
|
|
894
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1126
895
|
default:
|
|
1127
896
|
const parsedBody = parsedOutput.body;
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
...parsedBody,
|
|
1131
|
-
name: `${errorCode}`,
|
|
1132
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
897
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
898
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1133
899
|
$fault: "client",
|
|
1134
900
|
$metadata: deserializeMetadata(output),
|
|
1135
|
-
};
|
|
901
|
+
});
|
|
902
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1136
903
|
}
|
|
1137
|
-
const message = response.message || response.Message || errorCode;
|
|
1138
|
-
response.message = message;
|
|
1139
|
-
delete response.Message;
|
|
1140
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1141
904
|
};
|
|
1142
905
|
const deserializeAws_json1_1GetQueryExecutionCommand = async (output, context) => {
|
|
1143
906
|
if (output.statusCode >= 300) {
|
|
@@ -1164,35 +927,19 @@ const deserializeAws_json1_1GetQueryExecutionCommandError = async (output, conte
|
|
|
1164
927
|
switch (errorCode) {
|
|
1165
928
|
case "InternalServerException":
|
|
1166
929
|
case "com.amazonaws.athena#InternalServerException":
|
|
1167
|
-
|
|
1168
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1169
|
-
name: errorCode,
|
|
1170
|
-
$metadata: deserializeMetadata(output),
|
|
1171
|
-
};
|
|
1172
|
-
break;
|
|
930
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1173
931
|
case "InvalidRequestException":
|
|
1174
932
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1175
|
-
|
|
1176
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1177
|
-
name: errorCode,
|
|
1178
|
-
$metadata: deserializeMetadata(output),
|
|
1179
|
-
};
|
|
1180
|
-
break;
|
|
933
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1181
934
|
default:
|
|
1182
935
|
const parsedBody = parsedOutput.body;
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
...parsedBody,
|
|
1186
|
-
name: `${errorCode}`,
|
|
1187
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
936
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
937
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1188
938
|
$fault: "client",
|
|
1189
939
|
$metadata: deserializeMetadata(output),
|
|
1190
|
-
};
|
|
940
|
+
});
|
|
941
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1191
942
|
}
|
|
1192
|
-
const message = response.message || response.Message || errorCode;
|
|
1193
|
-
response.message = message;
|
|
1194
|
-
delete response.Message;
|
|
1195
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1196
943
|
};
|
|
1197
944
|
const deserializeAws_json1_1GetQueryResultsCommand = async (output, context) => {
|
|
1198
945
|
if (output.statusCode >= 300) {
|
|
@@ -1219,35 +966,19 @@ const deserializeAws_json1_1GetQueryResultsCommandError = async (output, context
|
|
|
1219
966
|
switch (errorCode) {
|
|
1220
967
|
case "InternalServerException":
|
|
1221
968
|
case "com.amazonaws.athena#InternalServerException":
|
|
1222
|
-
|
|
1223
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1224
|
-
name: errorCode,
|
|
1225
|
-
$metadata: deserializeMetadata(output),
|
|
1226
|
-
};
|
|
1227
|
-
break;
|
|
969
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1228
970
|
case "InvalidRequestException":
|
|
1229
971
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1230
|
-
|
|
1231
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1232
|
-
name: errorCode,
|
|
1233
|
-
$metadata: deserializeMetadata(output),
|
|
1234
|
-
};
|
|
1235
|
-
break;
|
|
972
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1236
973
|
default:
|
|
1237
974
|
const parsedBody = parsedOutput.body;
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
...parsedBody,
|
|
1241
|
-
name: `${errorCode}`,
|
|
1242
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
975
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
976
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1243
977
|
$fault: "client",
|
|
1244
978
|
$metadata: deserializeMetadata(output),
|
|
1245
|
-
};
|
|
979
|
+
});
|
|
980
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1246
981
|
}
|
|
1247
|
-
const message = response.message || response.Message || errorCode;
|
|
1248
|
-
response.message = message;
|
|
1249
|
-
delete response.Message;
|
|
1250
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1251
982
|
};
|
|
1252
983
|
const deserializeAws_json1_1GetTableMetadataCommand = async (output, context) => {
|
|
1253
984
|
if (output.statusCode >= 300) {
|
|
@@ -1274,43 +1005,22 @@ const deserializeAws_json1_1GetTableMetadataCommandError = async (output, contex
|
|
|
1274
1005
|
switch (errorCode) {
|
|
1275
1006
|
case "InternalServerException":
|
|
1276
1007
|
case "com.amazonaws.athena#InternalServerException":
|
|
1277
|
-
|
|
1278
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1279
|
-
name: errorCode,
|
|
1280
|
-
$metadata: deserializeMetadata(output),
|
|
1281
|
-
};
|
|
1282
|
-
break;
|
|
1008
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1283
1009
|
case "InvalidRequestException":
|
|
1284
1010
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1285
|
-
|
|
1286
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1287
|
-
name: errorCode,
|
|
1288
|
-
$metadata: deserializeMetadata(output),
|
|
1289
|
-
};
|
|
1290
|
-
break;
|
|
1011
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1291
1012
|
case "MetadataException":
|
|
1292
1013
|
case "com.amazonaws.athena#MetadataException":
|
|
1293
|
-
|
|
1294
|
-
...(await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context)),
|
|
1295
|
-
name: errorCode,
|
|
1296
|
-
$metadata: deserializeMetadata(output),
|
|
1297
|
-
};
|
|
1298
|
-
break;
|
|
1014
|
+
throw await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context);
|
|
1299
1015
|
default:
|
|
1300
1016
|
const parsedBody = parsedOutput.body;
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
...parsedBody,
|
|
1304
|
-
name: `${errorCode}`,
|
|
1305
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1017
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1018
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1306
1019
|
$fault: "client",
|
|
1307
1020
|
$metadata: deserializeMetadata(output),
|
|
1308
|
-
};
|
|
1021
|
+
});
|
|
1022
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1309
1023
|
}
|
|
1310
|
-
const message = response.message || response.Message || errorCode;
|
|
1311
|
-
response.message = message;
|
|
1312
|
-
delete response.Message;
|
|
1313
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1314
1024
|
};
|
|
1315
1025
|
const deserializeAws_json1_1GetWorkGroupCommand = async (output, context) => {
|
|
1316
1026
|
if (output.statusCode >= 300) {
|
|
@@ -1337,35 +1047,19 @@ const deserializeAws_json1_1GetWorkGroupCommandError = async (output, context) =
|
|
|
1337
1047
|
switch (errorCode) {
|
|
1338
1048
|
case "InternalServerException":
|
|
1339
1049
|
case "com.amazonaws.athena#InternalServerException":
|
|
1340
|
-
|
|
1341
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1342
|
-
name: errorCode,
|
|
1343
|
-
$metadata: deserializeMetadata(output),
|
|
1344
|
-
};
|
|
1345
|
-
break;
|
|
1050
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1346
1051
|
case "InvalidRequestException":
|
|
1347
1052
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1348
|
-
|
|
1349
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1350
|
-
name: errorCode,
|
|
1351
|
-
$metadata: deserializeMetadata(output),
|
|
1352
|
-
};
|
|
1353
|
-
break;
|
|
1053
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1354
1054
|
default:
|
|
1355
1055
|
const parsedBody = parsedOutput.body;
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
...parsedBody,
|
|
1359
|
-
name: `${errorCode}`,
|
|
1360
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1056
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1057
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1361
1058
|
$fault: "client",
|
|
1362
1059
|
$metadata: deserializeMetadata(output),
|
|
1363
|
-
};
|
|
1060
|
+
});
|
|
1061
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1364
1062
|
}
|
|
1365
|
-
const message = response.message || response.Message || errorCode;
|
|
1366
|
-
response.message = message;
|
|
1367
|
-
delete response.Message;
|
|
1368
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1369
1063
|
};
|
|
1370
1064
|
const deserializeAws_json1_1ListDatabasesCommand = async (output, context) => {
|
|
1371
1065
|
if (output.statusCode >= 300) {
|
|
@@ -1392,43 +1086,22 @@ const deserializeAws_json1_1ListDatabasesCommandError = async (output, context)
|
|
|
1392
1086
|
switch (errorCode) {
|
|
1393
1087
|
case "InternalServerException":
|
|
1394
1088
|
case "com.amazonaws.athena#InternalServerException":
|
|
1395
|
-
|
|
1396
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1397
|
-
name: errorCode,
|
|
1398
|
-
$metadata: deserializeMetadata(output),
|
|
1399
|
-
};
|
|
1400
|
-
break;
|
|
1089
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1401
1090
|
case "InvalidRequestException":
|
|
1402
1091
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1403
|
-
|
|
1404
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1405
|
-
name: errorCode,
|
|
1406
|
-
$metadata: deserializeMetadata(output),
|
|
1407
|
-
};
|
|
1408
|
-
break;
|
|
1092
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1409
1093
|
case "MetadataException":
|
|
1410
1094
|
case "com.amazonaws.athena#MetadataException":
|
|
1411
|
-
|
|
1412
|
-
...(await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context)),
|
|
1413
|
-
name: errorCode,
|
|
1414
|
-
$metadata: deserializeMetadata(output),
|
|
1415
|
-
};
|
|
1416
|
-
break;
|
|
1095
|
+
throw await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context);
|
|
1417
1096
|
default:
|
|
1418
1097
|
const parsedBody = parsedOutput.body;
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
...parsedBody,
|
|
1422
|
-
name: `${errorCode}`,
|
|
1423
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1098
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1099
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1424
1100
|
$fault: "client",
|
|
1425
1101
|
$metadata: deserializeMetadata(output),
|
|
1426
|
-
};
|
|
1102
|
+
});
|
|
1103
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1427
1104
|
}
|
|
1428
|
-
const message = response.message || response.Message || errorCode;
|
|
1429
|
-
response.message = message;
|
|
1430
|
-
delete response.Message;
|
|
1431
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1432
1105
|
};
|
|
1433
1106
|
const deserializeAws_json1_1ListDataCatalogsCommand = async (output, context) => {
|
|
1434
1107
|
if (output.statusCode >= 300) {
|
|
@@ -1455,35 +1128,19 @@ const deserializeAws_json1_1ListDataCatalogsCommandError = async (output, contex
|
|
|
1455
1128
|
switch (errorCode) {
|
|
1456
1129
|
case "InternalServerException":
|
|
1457
1130
|
case "com.amazonaws.athena#InternalServerException":
|
|
1458
|
-
|
|
1459
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1460
|
-
name: errorCode,
|
|
1461
|
-
$metadata: deserializeMetadata(output),
|
|
1462
|
-
};
|
|
1463
|
-
break;
|
|
1131
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1464
1132
|
case "InvalidRequestException":
|
|
1465
1133
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1466
|
-
|
|
1467
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1468
|
-
name: errorCode,
|
|
1469
|
-
$metadata: deserializeMetadata(output),
|
|
1470
|
-
};
|
|
1471
|
-
break;
|
|
1134
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1472
1135
|
default:
|
|
1473
1136
|
const parsedBody = parsedOutput.body;
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
...parsedBody,
|
|
1477
|
-
name: `${errorCode}`,
|
|
1478
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1137
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1138
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1479
1139
|
$fault: "client",
|
|
1480
1140
|
$metadata: deserializeMetadata(output),
|
|
1481
|
-
};
|
|
1141
|
+
});
|
|
1142
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1482
1143
|
}
|
|
1483
|
-
const message = response.message || response.Message || errorCode;
|
|
1484
|
-
response.message = message;
|
|
1485
|
-
delete response.Message;
|
|
1486
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1487
1144
|
};
|
|
1488
1145
|
const deserializeAws_json1_1ListEngineVersionsCommand = async (output, context) => {
|
|
1489
1146
|
if (output.statusCode >= 300) {
|
|
@@ -1510,35 +1167,19 @@ const deserializeAws_json1_1ListEngineVersionsCommandError = async (output, cont
|
|
|
1510
1167
|
switch (errorCode) {
|
|
1511
1168
|
case "InternalServerException":
|
|
1512
1169
|
case "com.amazonaws.athena#InternalServerException":
|
|
1513
|
-
|
|
1514
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1515
|
-
name: errorCode,
|
|
1516
|
-
$metadata: deserializeMetadata(output),
|
|
1517
|
-
};
|
|
1518
|
-
break;
|
|
1170
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1519
1171
|
case "InvalidRequestException":
|
|
1520
1172
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1521
|
-
|
|
1522
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1523
|
-
name: errorCode,
|
|
1524
|
-
$metadata: deserializeMetadata(output),
|
|
1525
|
-
};
|
|
1526
|
-
break;
|
|
1173
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1527
1174
|
default:
|
|
1528
1175
|
const parsedBody = parsedOutput.body;
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
...parsedBody,
|
|
1532
|
-
name: `${errorCode}`,
|
|
1533
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1176
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1177
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1534
1178
|
$fault: "client",
|
|
1535
1179
|
$metadata: deserializeMetadata(output),
|
|
1536
|
-
};
|
|
1180
|
+
});
|
|
1181
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1537
1182
|
}
|
|
1538
|
-
const message = response.message || response.Message || errorCode;
|
|
1539
|
-
response.message = message;
|
|
1540
|
-
delete response.Message;
|
|
1541
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1542
1183
|
};
|
|
1543
1184
|
const deserializeAws_json1_1ListNamedQueriesCommand = async (output, context) => {
|
|
1544
1185
|
if (output.statusCode >= 300) {
|
|
@@ -1565,35 +1206,19 @@ const deserializeAws_json1_1ListNamedQueriesCommandError = async (output, contex
|
|
|
1565
1206
|
switch (errorCode) {
|
|
1566
1207
|
case "InternalServerException":
|
|
1567
1208
|
case "com.amazonaws.athena#InternalServerException":
|
|
1568
|
-
|
|
1569
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1570
|
-
name: errorCode,
|
|
1571
|
-
$metadata: deserializeMetadata(output),
|
|
1572
|
-
};
|
|
1573
|
-
break;
|
|
1209
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1574
1210
|
case "InvalidRequestException":
|
|
1575
1211
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1576
|
-
|
|
1577
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1578
|
-
name: errorCode,
|
|
1579
|
-
$metadata: deserializeMetadata(output),
|
|
1580
|
-
};
|
|
1581
|
-
break;
|
|
1212
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1582
1213
|
default:
|
|
1583
1214
|
const parsedBody = parsedOutput.body;
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
...parsedBody,
|
|
1587
|
-
name: `${errorCode}`,
|
|
1588
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1215
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1216
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1589
1217
|
$fault: "client",
|
|
1590
1218
|
$metadata: deserializeMetadata(output),
|
|
1591
|
-
};
|
|
1219
|
+
});
|
|
1220
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1592
1221
|
}
|
|
1593
|
-
const message = response.message || response.Message || errorCode;
|
|
1594
|
-
response.message = message;
|
|
1595
|
-
delete response.Message;
|
|
1596
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1597
1222
|
};
|
|
1598
1223
|
const deserializeAws_json1_1ListPreparedStatementsCommand = async (output, context) => {
|
|
1599
1224
|
if (output.statusCode >= 300) {
|
|
@@ -1620,35 +1245,19 @@ const deserializeAws_json1_1ListPreparedStatementsCommandError = async (output,
|
|
|
1620
1245
|
switch (errorCode) {
|
|
1621
1246
|
case "InternalServerException":
|
|
1622
1247
|
case "com.amazonaws.athena#InternalServerException":
|
|
1623
|
-
|
|
1624
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1625
|
-
name: errorCode,
|
|
1626
|
-
$metadata: deserializeMetadata(output),
|
|
1627
|
-
};
|
|
1628
|
-
break;
|
|
1248
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1629
1249
|
case "InvalidRequestException":
|
|
1630
1250
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1631
|
-
|
|
1632
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1633
|
-
name: errorCode,
|
|
1634
|
-
$metadata: deserializeMetadata(output),
|
|
1635
|
-
};
|
|
1636
|
-
break;
|
|
1251
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1637
1252
|
default:
|
|
1638
1253
|
const parsedBody = parsedOutput.body;
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
...parsedBody,
|
|
1642
|
-
name: `${errorCode}`,
|
|
1643
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1254
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1255
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1644
1256
|
$fault: "client",
|
|
1645
1257
|
$metadata: deserializeMetadata(output),
|
|
1646
|
-
};
|
|
1258
|
+
});
|
|
1259
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1647
1260
|
}
|
|
1648
|
-
const message = response.message || response.Message || errorCode;
|
|
1649
|
-
response.message = message;
|
|
1650
|
-
delete response.Message;
|
|
1651
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1652
1261
|
};
|
|
1653
1262
|
const deserializeAws_json1_1ListQueryExecutionsCommand = async (output, context) => {
|
|
1654
1263
|
if (output.statusCode >= 300) {
|
|
@@ -1675,35 +1284,19 @@ const deserializeAws_json1_1ListQueryExecutionsCommandError = async (output, con
|
|
|
1675
1284
|
switch (errorCode) {
|
|
1676
1285
|
case "InternalServerException":
|
|
1677
1286
|
case "com.amazonaws.athena#InternalServerException":
|
|
1678
|
-
|
|
1679
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1680
|
-
name: errorCode,
|
|
1681
|
-
$metadata: deserializeMetadata(output),
|
|
1682
|
-
};
|
|
1683
|
-
break;
|
|
1287
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1684
1288
|
case "InvalidRequestException":
|
|
1685
1289
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1686
|
-
|
|
1687
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1688
|
-
name: errorCode,
|
|
1689
|
-
$metadata: deserializeMetadata(output),
|
|
1690
|
-
};
|
|
1691
|
-
break;
|
|
1290
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1692
1291
|
default:
|
|
1693
1292
|
const parsedBody = parsedOutput.body;
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
...parsedBody,
|
|
1697
|
-
name: `${errorCode}`,
|
|
1698
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1293
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1294
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1699
1295
|
$fault: "client",
|
|
1700
1296
|
$metadata: deserializeMetadata(output),
|
|
1701
|
-
};
|
|
1297
|
+
});
|
|
1298
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1702
1299
|
}
|
|
1703
|
-
const message = response.message || response.Message || errorCode;
|
|
1704
|
-
response.message = message;
|
|
1705
|
-
delete response.Message;
|
|
1706
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1707
1300
|
};
|
|
1708
1301
|
const deserializeAws_json1_1ListTableMetadataCommand = async (output, context) => {
|
|
1709
1302
|
if (output.statusCode >= 300) {
|
|
@@ -1730,43 +1323,22 @@ const deserializeAws_json1_1ListTableMetadataCommandError = async (output, conte
|
|
|
1730
1323
|
switch (errorCode) {
|
|
1731
1324
|
case "InternalServerException":
|
|
1732
1325
|
case "com.amazonaws.athena#InternalServerException":
|
|
1733
|
-
|
|
1734
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1735
|
-
name: errorCode,
|
|
1736
|
-
$metadata: deserializeMetadata(output),
|
|
1737
|
-
};
|
|
1738
|
-
break;
|
|
1326
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1739
1327
|
case "InvalidRequestException":
|
|
1740
1328
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1741
|
-
|
|
1742
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1743
|
-
name: errorCode,
|
|
1744
|
-
$metadata: deserializeMetadata(output),
|
|
1745
|
-
};
|
|
1746
|
-
break;
|
|
1329
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1747
1330
|
case "MetadataException":
|
|
1748
1331
|
case "com.amazonaws.athena#MetadataException":
|
|
1749
|
-
|
|
1750
|
-
...(await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context)),
|
|
1751
|
-
name: errorCode,
|
|
1752
|
-
$metadata: deserializeMetadata(output),
|
|
1753
|
-
};
|
|
1754
|
-
break;
|
|
1332
|
+
throw await deserializeAws_json1_1MetadataExceptionResponse(parsedOutput, context);
|
|
1755
1333
|
default:
|
|
1756
1334
|
const parsedBody = parsedOutput.body;
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
...parsedBody,
|
|
1760
|
-
name: `${errorCode}`,
|
|
1761
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1335
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1336
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1762
1337
|
$fault: "client",
|
|
1763
1338
|
$metadata: deserializeMetadata(output),
|
|
1764
|
-
};
|
|
1339
|
+
});
|
|
1340
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1765
1341
|
}
|
|
1766
|
-
const message = response.message || response.Message || errorCode;
|
|
1767
|
-
response.message = message;
|
|
1768
|
-
delete response.Message;
|
|
1769
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1770
1342
|
};
|
|
1771
1343
|
const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
1772
1344
|
if (output.statusCode >= 300) {
|
|
@@ -1793,43 +1365,22 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
|
|
|
1793
1365
|
switch (errorCode) {
|
|
1794
1366
|
case "InternalServerException":
|
|
1795
1367
|
case "com.amazonaws.athena#InternalServerException":
|
|
1796
|
-
|
|
1797
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1798
|
-
name: errorCode,
|
|
1799
|
-
$metadata: deserializeMetadata(output),
|
|
1800
|
-
};
|
|
1801
|
-
break;
|
|
1368
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1802
1369
|
case "InvalidRequestException":
|
|
1803
1370
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1804
|
-
|
|
1805
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1806
|
-
name: errorCode,
|
|
1807
|
-
$metadata: deserializeMetadata(output),
|
|
1808
|
-
};
|
|
1809
|
-
break;
|
|
1371
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1810
1372
|
case "ResourceNotFoundException":
|
|
1811
1373
|
case "com.amazonaws.athena#ResourceNotFoundException":
|
|
1812
|
-
|
|
1813
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1814
|
-
name: errorCode,
|
|
1815
|
-
$metadata: deserializeMetadata(output),
|
|
1816
|
-
};
|
|
1817
|
-
break;
|
|
1374
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1818
1375
|
default:
|
|
1819
1376
|
const parsedBody = parsedOutput.body;
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
...parsedBody,
|
|
1823
|
-
name: `${errorCode}`,
|
|
1824
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1377
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1378
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1825
1379
|
$fault: "client",
|
|
1826
1380
|
$metadata: deserializeMetadata(output),
|
|
1827
|
-
};
|
|
1381
|
+
});
|
|
1382
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1828
1383
|
}
|
|
1829
|
-
const message = response.message || response.Message || errorCode;
|
|
1830
|
-
response.message = message;
|
|
1831
|
-
delete response.Message;
|
|
1832
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1833
1384
|
};
|
|
1834
1385
|
const deserializeAws_json1_1ListWorkGroupsCommand = async (output, context) => {
|
|
1835
1386
|
if (output.statusCode >= 300) {
|
|
@@ -1856,35 +1407,19 @@ const deserializeAws_json1_1ListWorkGroupsCommandError = async (output, context)
|
|
|
1856
1407
|
switch (errorCode) {
|
|
1857
1408
|
case "InternalServerException":
|
|
1858
1409
|
case "com.amazonaws.athena#InternalServerException":
|
|
1859
|
-
|
|
1860
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1861
|
-
name: errorCode,
|
|
1862
|
-
$metadata: deserializeMetadata(output),
|
|
1863
|
-
};
|
|
1864
|
-
break;
|
|
1410
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1865
1411
|
case "InvalidRequestException":
|
|
1866
1412
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1867
|
-
|
|
1868
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1869
|
-
name: errorCode,
|
|
1870
|
-
$metadata: deserializeMetadata(output),
|
|
1871
|
-
};
|
|
1872
|
-
break;
|
|
1413
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1873
1414
|
default:
|
|
1874
1415
|
const parsedBody = parsedOutput.body;
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
...parsedBody,
|
|
1878
|
-
name: `${errorCode}`,
|
|
1879
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1416
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1417
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1880
1418
|
$fault: "client",
|
|
1881
1419
|
$metadata: deserializeMetadata(output),
|
|
1882
|
-
};
|
|
1420
|
+
});
|
|
1421
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1883
1422
|
}
|
|
1884
|
-
const message = response.message || response.Message || errorCode;
|
|
1885
|
-
response.message = message;
|
|
1886
|
-
delete response.Message;
|
|
1887
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1888
1423
|
};
|
|
1889
1424
|
const deserializeAws_json1_1StartQueryExecutionCommand = async (output, context) => {
|
|
1890
1425
|
if (output.statusCode >= 300) {
|
|
@@ -1911,43 +1446,22 @@ const deserializeAws_json1_1StartQueryExecutionCommandError = async (output, con
|
|
|
1911
1446
|
switch (errorCode) {
|
|
1912
1447
|
case "InternalServerException":
|
|
1913
1448
|
case "com.amazonaws.athena#InternalServerException":
|
|
1914
|
-
|
|
1915
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1916
|
-
name: errorCode,
|
|
1917
|
-
$metadata: deserializeMetadata(output),
|
|
1918
|
-
};
|
|
1919
|
-
break;
|
|
1449
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1920
1450
|
case "InvalidRequestException":
|
|
1921
1451
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1922
|
-
|
|
1923
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1924
|
-
name: errorCode,
|
|
1925
|
-
$metadata: deserializeMetadata(output),
|
|
1926
|
-
};
|
|
1927
|
-
break;
|
|
1452
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1928
1453
|
case "TooManyRequestsException":
|
|
1929
1454
|
case "com.amazonaws.athena#TooManyRequestsException":
|
|
1930
|
-
|
|
1931
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1932
|
-
name: errorCode,
|
|
1933
|
-
$metadata: deserializeMetadata(output),
|
|
1934
|
-
};
|
|
1935
|
-
break;
|
|
1455
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1936
1456
|
default:
|
|
1937
1457
|
const parsedBody = parsedOutput.body;
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
...parsedBody,
|
|
1941
|
-
name: `${errorCode}`,
|
|
1942
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1458
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1459
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1943
1460
|
$fault: "client",
|
|
1944
1461
|
$metadata: deserializeMetadata(output),
|
|
1945
|
-
};
|
|
1462
|
+
});
|
|
1463
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1946
1464
|
}
|
|
1947
|
-
const message = response.message || response.Message || errorCode;
|
|
1948
|
-
response.message = message;
|
|
1949
|
-
delete response.Message;
|
|
1950
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1951
1465
|
};
|
|
1952
1466
|
const deserializeAws_json1_1StopQueryExecutionCommand = async (output, context) => {
|
|
1953
1467
|
if (output.statusCode >= 300) {
|
|
@@ -1974,35 +1488,19 @@ const deserializeAws_json1_1StopQueryExecutionCommandError = async (output, cont
|
|
|
1974
1488
|
switch (errorCode) {
|
|
1975
1489
|
case "InternalServerException":
|
|
1976
1490
|
case "com.amazonaws.athena#InternalServerException":
|
|
1977
|
-
|
|
1978
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1979
|
-
name: errorCode,
|
|
1980
|
-
$metadata: deserializeMetadata(output),
|
|
1981
|
-
};
|
|
1982
|
-
break;
|
|
1491
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1983
1492
|
case "InvalidRequestException":
|
|
1984
1493
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
1985
|
-
|
|
1986
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1987
|
-
name: errorCode,
|
|
1988
|
-
$metadata: deserializeMetadata(output),
|
|
1989
|
-
};
|
|
1990
|
-
break;
|
|
1494
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1991
1495
|
default:
|
|
1992
1496
|
const parsedBody = parsedOutput.body;
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
...parsedBody,
|
|
1996
|
-
name: `${errorCode}`,
|
|
1997
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1497
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1498
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1998
1499
|
$fault: "client",
|
|
1999
1500
|
$metadata: deserializeMetadata(output),
|
|
2000
|
-
};
|
|
1501
|
+
});
|
|
1502
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2001
1503
|
}
|
|
2002
|
-
const message = response.message || response.Message || errorCode;
|
|
2003
|
-
response.message = message;
|
|
2004
|
-
delete response.Message;
|
|
2005
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2006
1504
|
};
|
|
2007
1505
|
const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
2008
1506
|
if (output.statusCode >= 300) {
|
|
@@ -2029,43 +1527,22 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
|
|
|
2029
1527
|
switch (errorCode) {
|
|
2030
1528
|
case "InternalServerException":
|
|
2031
1529
|
case "com.amazonaws.athena#InternalServerException":
|
|
2032
|
-
|
|
2033
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2034
|
-
name: errorCode,
|
|
2035
|
-
$metadata: deserializeMetadata(output),
|
|
2036
|
-
};
|
|
2037
|
-
break;
|
|
1530
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
2038
1531
|
case "InvalidRequestException":
|
|
2039
1532
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
2040
|
-
|
|
2041
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2042
|
-
name: errorCode,
|
|
2043
|
-
$metadata: deserializeMetadata(output),
|
|
2044
|
-
};
|
|
2045
|
-
break;
|
|
1533
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
2046
1534
|
case "ResourceNotFoundException":
|
|
2047
1535
|
case "com.amazonaws.athena#ResourceNotFoundException":
|
|
2048
|
-
|
|
2049
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2050
|
-
name: errorCode,
|
|
2051
|
-
$metadata: deserializeMetadata(output),
|
|
2052
|
-
};
|
|
2053
|
-
break;
|
|
1536
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2054
1537
|
default:
|
|
2055
1538
|
const parsedBody = parsedOutput.body;
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
...parsedBody,
|
|
2059
|
-
name: `${errorCode}`,
|
|
2060
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1539
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1540
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2061
1541
|
$fault: "client",
|
|
2062
1542
|
$metadata: deserializeMetadata(output),
|
|
2063
|
-
};
|
|
1543
|
+
});
|
|
1544
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2064
1545
|
}
|
|
2065
|
-
const message = response.message || response.Message || errorCode;
|
|
2066
|
-
response.message = message;
|
|
2067
|
-
delete response.Message;
|
|
2068
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2069
1546
|
};
|
|
2070
1547
|
const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
2071
1548
|
if (output.statusCode >= 300) {
|
|
@@ -2092,43 +1569,22 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
|
|
|
2092
1569
|
switch (errorCode) {
|
|
2093
1570
|
case "InternalServerException":
|
|
2094
1571
|
case "com.amazonaws.athena#InternalServerException":
|
|
2095
|
-
|
|
2096
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2097
|
-
name: errorCode,
|
|
2098
|
-
$metadata: deserializeMetadata(output),
|
|
2099
|
-
};
|
|
2100
|
-
break;
|
|
1572
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
2101
1573
|
case "InvalidRequestException":
|
|
2102
1574
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
2103
|
-
|
|
2104
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2105
|
-
name: errorCode,
|
|
2106
|
-
$metadata: deserializeMetadata(output),
|
|
2107
|
-
};
|
|
2108
|
-
break;
|
|
1575
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
2109
1576
|
case "ResourceNotFoundException":
|
|
2110
1577
|
case "com.amazonaws.athena#ResourceNotFoundException":
|
|
2111
|
-
|
|
2112
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2113
|
-
name: errorCode,
|
|
2114
|
-
$metadata: deserializeMetadata(output),
|
|
2115
|
-
};
|
|
2116
|
-
break;
|
|
1578
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2117
1579
|
default:
|
|
2118
1580
|
const parsedBody = parsedOutput.body;
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
...parsedBody,
|
|
2122
|
-
name: `${errorCode}`,
|
|
2123
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1581
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1582
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2124
1583
|
$fault: "client",
|
|
2125
1584
|
$metadata: deserializeMetadata(output),
|
|
2126
|
-
};
|
|
1585
|
+
});
|
|
1586
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2127
1587
|
}
|
|
2128
|
-
const message = response.message || response.Message || errorCode;
|
|
2129
|
-
response.message = message;
|
|
2130
|
-
delete response.Message;
|
|
2131
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2132
1588
|
};
|
|
2133
1589
|
const deserializeAws_json1_1UpdateDataCatalogCommand = async (output, context) => {
|
|
2134
1590
|
if (output.statusCode >= 300) {
|
|
@@ -2155,35 +1611,19 @@ const deserializeAws_json1_1UpdateDataCatalogCommandError = async (output, conte
|
|
|
2155
1611
|
switch (errorCode) {
|
|
2156
1612
|
case "InternalServerException":
|
|
2157
1613
|
case "com.amazonaws.athena#InternalServerException":
|
|
2158
|
-
|
|
2159
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2160
|
-
name: errorCode,
|
|
2161
|
-
$metadata: deserializeMetadata(output),
|
|
2162
|
-
};
|
|
2163
|
-
break;
|
|
1614
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
2164
1615
|
case "InvalidRequestException":
|
|
2165
1616
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
2166
|
-
|
|
2167
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2168
|
-
name: errorCode,
|
|
2169
|
-
$metadata: deserializeMetadata(output),
|
|
2170
|
-
};
|
|
2171
|
-
break;
|
|
1617
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
2172
1618
|
default:
|
|
2173
1619
|
const parsedBody = parsedOutput.body;
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
...parsedBody,
|
|
2177
|
-
name: `${errorCode}`,
|
|
2178
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1620
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1621
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2179
1622
|
$fault: "client",
|
|
2180
1623
|
$metadata: deserializeMetadata(output),
|
|
2181
|
-
};
|
|
1624
|
+
});
|
|
1625
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2182
1626
|
}
|
|
2183
|
-
const message = response.message || response.Message || errorCode;
|
|
2184
|
-
response.message = message;
|
|
2185
|
-
delete response.Message;
|
|
2186
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2187
1627
|
};
|
|
2188
1628
|
const deserializeAws_json1_1UpdatePreparedStatementCommand = async (output, context) => {
|
|
2189
1629
|
if (output.statusCode >= 300) {
|
|
@@ -2210,43 +1650,22 @@ const deserializeAws_json1_1UpdatePreparedStatementCommandError = async (output,
|
|
|
2210
1650
|
switch (errorCode) {
|
|
2211
1651
|
case "InternalServerException":
|
|
2212
1652
|
case "com.amazonaws.athena#InternalServerException":
|
|
2213
|
-
|
|
2214
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2215
|
-
name: errorCode,
|
|
2216
|
-
$metadata: deserializeMetadata(output),
|
|
2217
|
-
};
|
|
2218
|
-
break;
|
|
1653
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
2219
1654
|
case "InvalidRequestException":
|
|
2220
1655
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
2221
|
-
|
|
2222
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2223
|
-
name: errorCode,
|
|
2224
|
-
$metadata: deserializeMetadata(output),
|
|
2225
|
-
};
|
|
2226
|
-
break;
|
|
1656
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
2227
1657
|
case "ResourceNotFoundException":
|
|
2228
1658
|
case "com.amazonaws.athena#ResourceNotFoundException":
|
|
2229
|
-
|
|
2230
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2231
|
-
name: errorCode,
|
|
2232
|
-
$metadata: deserializeMetadata(output),
|
|
2233
|
-
};
|
|
2234
|
-
break;
|
|
1659
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2235
1660
|
default:
|
|
2236
1661
|
const parsedBody = parsedOutput.body;
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
...parsedBody,
|
|
2240
|
-
name: `${errorCode}`,
|
|
2241
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1662
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1663
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2242
1664
|
$fault: "client",
|
|
2243
1665
|
$metadata: deserializeMetadata(output),
|
|
2244
|
-
};
|
|
1666
|
+
});
|
|
1667
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2245
1668
|
}
|
|
2246
|
-
const message = response.message || response.Message || errorCode;
|
|
2247
|
-
response.message = message;
|
|
2248
|
-
delete response.Message;
|
|
2249
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2250
1669
|
};
|
|
2251
1670
|
const deserializeAws_json1_1UpdateWorkGroupCommand = async (output, context) => {
|
|
2252
1671
|
if (output.statusCode >= 300) {
|
|
@@ -2273,90 +1692,64 @@ const deserializeAws_json1_1UpdateWorkGroupCommandError = async (output, context
|
|
|
2273
1692
|
switch (errorCode) {
|
|
2274
1693
|
case "InternalServerException":
|
|
2275
1694
|
case "com.amazonaws.athena#InternalServerException":
|
|
2276
|
-
|
|
2277
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2278
|
-
name: errorCode,
|
|
2279
|
-
$metadata: deserializeMetadata(output),
|
|
2280
|
-
};
|
|
2281
|
-
break;
|
|
1695
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
2282
1696
|
case "InvalidRequestException":
|
|
2283
1697
|
case "com.amazonaws.athena#InvalidRequestException":
|
|
2284
|
-
|
|
2285
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2286
|
-
name: errorCode,
|
|
2287
|
-
$metadata: deserializeMetadata(output),
|
|
2288
|
-
};
|
|
2289
|
-
break;
|
|
1698
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
2290
1699
|
default:
|
|
2291
1700
|
const parsedBody = parsedOutput.body;
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
...parsedBody,
|
|
2295
|
-
name: `${errorCode}`,
|
|
2296
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1701
|
+
response = new AthenaServiceException_1.AthenaServiceException({
|
|
1702
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2297
1703
|
$fault: "client",
|
|
2298
1704
|
$metadata: deserializeMetadata(output),
|
|
2299
|
-
};
|
|
1705
|
+
});
|
|
1706
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2300
1707
|
}
|
|
2301
|
-
const message = response.message || response.Message || errorCode;
|
|
2302
|
-
response.message = message;
|
|
2303
|
-
delete response.Message;
|
|
2304
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2305
1708
|
};
|
|
2306
1709
|
const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
2307
1710
|
const body = parsedOutput.body;
|
|
2308
1711
|
const deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
2309
|
-
const
|
|
2310
|
-
name: "InternalServerException",
|
|
2311
|
-
$fault: "server",
|
|
1712
|
+
const exception = new models_0_1.InternalServerException({
|
|
2312
1713
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2313
1714
|
...deserialized,
|
|
2314
|
-
};
|
|
2315
|
-
return
|
|
1715
|
+
});
|
|
1716
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2316
1717
|
};
|
|
2317
1718
|
const deserializeAws_json1_1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
2318
1719
|
const body = parsedOutput.body;
|
|
2319
1720
|
const deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
2320
|
-
const
|
|
2321
|
-
name: "InvalidRequestException",
|
|
2322
|
-
$fault: "client",
|
|
1721
|
+
const exception = new models_0_1.InvalidRequestException({
|
|
2323
1722
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2324
1723
|
...deserialized,
|
|
2325
|
-
};
|
|
2326
|
-
return
|
|
1724
|
+
});
|
|
1725
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2327
1726
|
};
|
|
2328
1727
|
const deserializeAws_json1_1MetadataExceptionResponse = async (parsedOutput, context) => {
|
|
2329
1728
|
const body = parsedOutput.body;
|
|
2330
1729
|
const deserialized = deserializeAws_json1_1MetadataException(body, context);
|
|
2331
|
-
const
|
|
2332
|
-
name: "MetadataException",
|
|
2333
|
-
$fault: "client",
|
|
1730
|
+
const exception = new models_0_1.MetadataException({
|
|
2334
1731
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2335
1732
|
...deserialized,
|
|
2336
|
-
};
|
|
2337
|
-
return
|
|
1733
|
+
});
|
|
1734
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2338
1735
|
};
|
|
2339
1736
|
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
2340
1737
|
const body = parsedOutput.body;
|
|
2341
1738
|
const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
2342
|
-
const
|
|
2343
|
-
name: "ResourceNotFoundException",
|
|
2344
|
-
$fault: "client",
|
|
1739
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
2345
1740
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2346
1741
|
...deserialized,
|
|
2347
|
-
};
|
|
2348
|
-
return
|
|
1742
|
+
});
|
|
1743
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2349
1744
|
};
|
|
2350
1745
|
const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
2351
1746
|
const body = parsedOutput.body;
|
|
2352
1747
|
const deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);
|
|
2353
|
-
const
|
|
2354
|
-
name: "TooManyRequestsException",
|
|
2355
|
-
$fault: "client",
|
|
1748
|
+
const exception = new models_0_1.TooManyRequestsException({
|
|
2356
1749
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2357
1750
|
...deserialized,
|
|
2358
|
-
};
|
|
2359
|
-
return
|
|
1751
|
+
});
|
|
1752
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2360
1753
|
};
|
|
2361
1754
|
const serializeAws_json1_1BatchGetNamedQueryInput = (input, context) => {
|
|
2362
1755
|
return {
|
|
@@ -2778,6 +2171,7 @@ const serializeAws_json1_1WorkGroupConfigurationUpdates = (input, context) => {
|
|
|
2778
2171
|
const deserializeAws_json1_1AthenaError = (output, context) => {
|
|
2779
2172
|
return {
|
|
2780
2173
|
ErrorCategory: smithy_client_1.expectInt32(output.ErrorCategory),
|
|
2174
|
+
ErrorType: smithy_client_1.expectInt32(output.ErrorType),
|
|
2781
2175
|
};
|
|
2782
2176
|
};
|
|
2783
2177
|
const deserializeAws_json1_1BatchGetNamedQueryOutput = (output, context) => {
|
|
@@ -2822,7 +2216,7 @@ const deserializeAws_json1_1ColumnInfo = (output, context) => {
|
|
|
2822
2216
|
};
|
|
2823
2217
|
};
|
|
2824
2218
|
const deserializeAws_json1_1ColumnInfoList = (output, context) => {
|
|
2825
|
-
|
|
2219
|
+
const retVal = (output || [])
|
|
2826
2220
|
.filter((e) => e != null)
|
|
2827
2221
|
.map((entry) => {
|
|
2828
2222
|
if (entry === null) {
|
|
@@ -2830,9 +2224,10 @@ const deserializeAws_json1_1ColumnInfoList = (output, context) => {
|
|
|
2830
2224
|
}
|
|
2831
2225
|
return deserializeAws_json1_1ColumnInfo(entry, context);
|
|
2832
2226
|
});
|
|
2227
|
+
return retVal;
|
|
2833
2228
|
};
|
|
2834
2229
|
const deserializeAws_json1_1ColumnList = (output, context) => {
|
|
2835
|
-
|
|
2230
|
+
const retVal = (output || [])
|
|
2836
2231
|
.filter((e) => e != null)
|
|
2837
2232
|
.map((entry) => {
|
|
2838
2233
|
if (entry === null) {
|
|
@@ -2840,6 +2235,7 @@ const deserializeAws_json1_1ColumnList = (output, context) => {
|
|
|
2840
2235
|
}
|
|
2841
2236
|
return deserializeAws_json1_1Column(entry, context);
|
|
2842
2237
|
});
|
|
2238
|
+
return retVal;
|
|
2843
2239
|
};
|
|
2844
2240
|
const deserializeAws_json1_1CreateDataCatalogOutput = (output, context) => {
|
|
2845
2241
|
return {};
|
|
@@ -2865,7 +2261,7 @@ const deserializeAws_json1_1Database = (output, context) => {
|
|
|
2865
2261
|
};
|
|
2866
2262
|
};
|
|
2867
2263
|
const deserializeAws_json1_1DatabaseList = (output, context) => {
|
|
2868
|
-
|
|
2264
|
+
const retVal = (output || [])
|
|
2869
2265
|
.filter((e) => e != null)
|
|
2870
2266
|
.map((entry) => {
|
|
2871
2267
|
if (entry === null) {
|
|
@@ -2873,6 +2269,7 @@ const deserializeAws_json1_1DatabaseList = (output, context) => {
|
|
|
2873
2269
|
}
|
|
2874
2270
|
return deserializeAws_json1_1Database(entry, context);
|
|
2875
2271
|
});
|
|
2272
|
+
return retVal;
|
|
2876
2273
|
};
|
|
2877
2274
|
const deserializeAws_json1_1DataCatalog = (output, context) => {
|
|
2878
2275
|
return {
|
|
@@ -2891,7 +2288,7 @@ const deserializeAws_json1_1DataCatalogSummary = (output, context) => {
|
|
|
2891
2288
|
};
|
|
2892
2289
|
};
|
|
2893
2290
|
const deserializeAws_json1_1DataCatalogSummaryList = (output, context) => {
|
|
2894
|
-
|
|
2291
|
+
const retVal = (output || [])
|
|
2895
2292
|
.filter((e) => e != null)
|
|
2896
2293
|
.map((entry) => {
|
|
2897
2294
|
if (entry === null) {
|
|
@@ -2899,6 +2296,7 @@ const deserializeAws_json1_1DataCatalogSummaryList = (output, context) => {
|
|
|
2899
2296
|
}
|
|
2900
2297
|
return deserializeAws_json1_1DataCatalogSummary(entry, context);
|
|
2901
2298
|
});
|
|
2299
|
+
return retVal;
|
|
2902
2300
|
};
|
|
2903
2301
|
const deserializeAws_json1_1Datum = (output, context) => {
|
|
2904
2302
|
return {
|
|
@@ -2906,7 +2304,7 @@ const deserializeAws_json1_1Datum = (output, context) => {
|
|
|
2906
2304
|
};
|
|
2907
2305
|
};
|
|
2908
2306
|
const deserializeAws_json1_1datumList = (output, context) => {
|
|
2909
|
-
|
|
2307
|
+
const retVal = (output || [])
|
|
2910
2308
|
.filter((e) => e != null)
|
|
2911
2309
|
.map((entry) => {
|
|
2912
2310
|
if (entry === null) {
|
|
@@ -2914,6 +2312,7 @@ const deserializeAws_json1_1datumList = (output, context) => {
|
|
|
2914
2312
|
}
|
|
2915
2313
|
return deserializeAws_json1_1Datum(entry, context);
|
|
2916
2314
|
});
|
|
2315
|
+
return retVal;
|
|
2917
2316
|
};
|
|
2918
2317
|
const deserializeAws_json1_1DeleteDataCatalogOutput = (output, context) => {
|
|
2919
2318
|
return {};
|
|
@@ -2940,7 +2339,7 @@ const deserializeAws_json1_1EngineVersion = (output, context) => {
|
|
|
2940
2339
|
};
|
|
2941
2340
|
};
|
|
2942
2341
|
const deserializeAws_json1_1EngineVersionsList = (output, context) => {
|
|
2943
|
-
|
|
2342
|
+
const retVal = (output || [])
|
|
2944
2343
|
.filter((e) => e != null)
|
|
2945
2344
|
.map((entry) => {
|
|
2946
2345
|
if (entry === null) {
|
|
@@ -2948,6 +2347,7 @@ const deserializeAws_json1_1EngineVersionsList = (output, context) => {
|
|
|
2948
2347
|
}
|
|
2949
2348
|
return deserializeAws_json1_1EngineVersion(entry, context);
|
|
2950
2349
|
});
|
|
2350
|
+
return retVal;
|
|
2951
2351
|
};
|
|
2952
2352
|
const deserializeAws_json1_1GetDatabaseOutput = (output, context) => {
|
|
2953
2353
|
return {
|
|
@@ -3106,7 +2506,7 @@ const deserializeAws_json1_1NamedQuery = (output, context) => {
|
|
|
3106
2506
|
};
|
|
3107
2507
|
};
|
|
3108
2508
|
const deserializeAws_json1_1NamedQueryIdList = (output, context) => {
|
|
3109
|
-
|
|
2509
|
+
const retVal = (output || [])
|
|
3110
2510
|
.filter((e) => e != null)
|
|
3111
2511
|
.map((entry) => {
|
|
3112
2512
|
if (entry === null) {
|
|
@@ -3114,9 +2514,10 @@ const deserializeAws_json1_1NamedQueryIdList = (output, context) => {
|
|
|
3114
2514
|
}
|
|
3115
2515
|
return smithy_client_1.expectString(entry);
|
|
3116
2516
|
});
|
|
2517
|
+
return retVal;
|
|
3117
2518
|
};
|
|
3118
2519
|
const deserializeAws_json1_1NamedQueryList = (output, context) => {
|
|
3119
|
-
|
|
2520
|
+
const retVal = (output || [])
|
|
3120
2521
|
.filter((e) => e != null)
|
|
3121
2522
|
.map((entry) => {
|
|
3122
2523
|
if (entry === null) {
|
|
@@ -3124,6 +2525,7 @@ const deserializeAws_json1_1NamedQueryList = (output, context) => {
|
|
|
3124
2525
|
}
|
|
3125
2526
|
return deserializeAws_json1_1NamedQuery(entry, context);
|
|
3126
2527
|
});
|
|
2528
|
+
return retVal;
|
|
3127
2529
|
};
|
|
3128
2530
|
const deserializeAws_json1_1ParametersMap = (output, context) => {
|
|
3129
2531
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -3148,7 +2550,7 @@ const deserializeAws_json1_1PreparedStatement = (output, context) => {
|
|
|
3148
2550
|
};
|
|
3149
2551
|
};
|
|
3150
2552
|
const deserializeAws_json1_1PreparedStatementsList = (output, context) => {
|
|
3151
|
-
|
|
2553
|
+
const retVal = (output || [])
|
|
3152
2554
|
.filter((e) => e != null)
|
|
3153
2555
|
.map((entry) => {
|
|
3154
2556
|
if (entry === null) {
|
|
@@ -3156,6 +2558,7 @@ const deserializeAws_json1_1PreparedStatementsList = (output, context) => {
|
|
|
3156
2558
|
}
|
|
3157
2559
|
return deserializeAws_json1_1PreparedStatementSummary(entry, context);
|
|
3158
2560
|
});
|
|
2561
|
+
return retVal;
|
|
3159
2562
|
};
|
|
3160
2563
|
const deserializeAws_json1_1PreparedStatementSummary = (output, context) => {
|
|
3161
2564
|
return {
|
|
@@ -3195,7 +2598,7 @@ const deserializeAws_json1_1QueryExecutionContext = (output, context) => {
|
|
|
3195
2598
|
};
|
|
3196
2599
|
};
|
|
3197
2600
|
const deserializeAws_json1_1QueryExecutionIdList = (output, context) => {
|
|
3198
|
-
|
|
2601
|
+
const retVal = (output || [])
|
|
3199
2602
|
.filter((e) => e != null)
|
|
3200
2603
|
.map((entry) => {
|
|
3201
2604
|
if (entry === null) {
|
|
@@ -3203,9 +2606,10 @@ const deserializeAws_json1_1QueryExecutionIdList = (output, context) => {
|
|
|
3203
2606
|
}
|
|
3204
2607
|
return smithy_client_1.expectString(entry);
|
|
3205
2608
|
});
|
|
2609
|
+
return retVal;
|
|
3206
2610
|
};
|
|
3207
2611
|
const deserializeAws_json1_1QueryExecutionList = (output, context) => {
|
|
3208
|
-
|
|
2612
|
+
const retVal = (output || [])
|
|
3209
2613
|
.filter((e) => e != null)
|
|
3210
2614
|
.map((entry) => {
|
|
3211
2615
|
if (entry === null) {
|
|
@@ -3213,6 +2617,7 @@ const deserializeAws_json1_1QueryExecutionList = (output, context) => {
|
|
|
3213
2617
|
}
|
|
3214
2618
|
return deserializeAws_json1_1QueryExecution(entry, context);
|
|
3215
2619
|
});
|
|
2620
|
+
return retVal;
|
|
3216
2621
|
};
|
|
3217
2622
|
const deserializeAws_json1_1QueryExecutionStatistics = (output, context) => {
|
|
3218
2623
|
return {
|
|
@@ -3280,7 +2685,7 @@ const deserializeAws_json1_1Row = (output, context) => {
|
|
|
3280
2685
|
};
|
|
3281
2686
|
};
|
|
3282
2687
|
const deserializeAws_json1_1RowList = (output, context) => {
|
|
3283
|
-
|
|
2688
|
+
const retVal = (output || [])
|
|
3284
2689
|
.filter((e) => e != null)
|
|
3285
2690
|
.map((entry) => {
|
|
3286
2691
|
if (entry === null) {
|
|
@@ -3288,6 +2693,7 @@ const deserializeAws_json1_1RowList = (output, context) => {
|
|
|
3288
2693
|
}
|
|
3289
2694
|
return deserializeAws_json1_1Row(entry, context);
|
|
3290
2695
|
});
|
|
2696
|
+
return retVal;
|
|
3291
2697
|
};
|
|
3292
2698
|
const deserializeAws_json1_1StartQueryExecutionOutput = (output, context) => {
|
|
3293
2699
|
return {
|
|
@@ -3319,7 +2725,7 @@ const deserializeAws_json1_1TableMetadata = (output, context) => {
|
|
|
3319
2725
|
};
|
|
3320
2726
|
};
|
|
3321
2727
|
const deserializeAws_json1_1TableMetadataList = (output, context) => {
|
|
3322
|
-
|
|
2728
|
+
const retVal = (output || [])
|
|
3323
2729
|
.filter((e) => e != null)
|
|
3324
2730
|
.map((entry) => {
|
|
3325
2731
|
if (entry === null) {
|
|
@@ -3327,6 +2733,7 @@ const deserializeAws_json1_1TableMetadataList = (output, context) => {
|
|
|
3327
2733
|
}
|
|
3328
2734
|
return deserializeAws_json1_1TableMetadata(entry, context);
|
|
3329
2735
|
});
|
|
2736
|
+
return retVal;
|
|
3330
2737
|
};
|
|
3331
2738
|
const deserializeAws_json1_1Tag = (output, context) => {
|
|
3332
2739
|
return {
|
|
@@ -3335,7 +2742,7 @@ const deserializeAws_json1_1Tag = (output, context) => {
|
|
|
3335
2742
|
};
|
|
3336
2743
|
};
|
|
3337
2744
|
const deserializeAws_json1_1TagList = (output, context) => {
|
|
3338
|
-
|
|
2745
|
+
const retVal = (output || [])
|
|
3339
2746
|
.filter((e) => e != null)
|
|
3340
2747
|
.map((entry) => {
|
|
3341
2748
|
if (entry === null) {
|
|
@@ -3343,6 +2750,7 @@ const deserializeAws_json1_1TagList = (output, context) => {
|
|
|
3343
2750
|
}
|
|
3344
2751
|
return deserializeAws_json1_1Tag(entry, context);
|
|
3345
2752
|
});
|
|
2753
|
+
return retVal;
|
|
3346
2754
|
};
|
|
3347
2755
|
const deserializeAws_json1_1TagResourceOutput = (output, context) => {
|
|
3348
2756
|
return {};
|
|
@@ -3361,7 +2769,7 @@ const deserializeAws_json1_1UnprocessedNamedQueryId = (output, context) => {
|
|
|
3361
2769
|
};
|
|
3362
2770
|
};
|
|
3363
2771
|
const deserializeAws_json1_1UnprocessedNamedQueryIdList = (output, context) => {
|
|
3364
|
-
|
|
2772
|
+
const retVal = (output || [])
|
|
3365
2773
|
.filter((e) => e != null)
|
|
3366
2774
|
.map((entry) => {
|
|
3367
2775
|
if (entry === null) {
|
|
@@ -3369,6 +2777,7 @@ const deserializeAws_json1_1UnprocessedNamedQueryIdList = (output, context) => {
|
|
|
3369
2777
|
}
|
|
3370
2778
|
return deserializeAws_json1_1UnprocessedNamedQueryId(entry, context);
|
|
3371
2779
|
});
|
|
2780
|
+
return retVal;
|
|
3372
2781
|
};
|
|
3373
2782
|
const deserializeAws_json1_1UnprocessedQueryExecutionId = (output, context) => {
|
|
3374
2783
|
return {
|
|
@@ -3378,7 +2787,7 @@ const deserializeAws_json1_1UnprocessedQueryExecutionId = (output, context) => {
|
|
|
3378
2787
|
};
|
|
3379
2788
|
};
|
|
3380
2789
|
const deserializeAws_json1_1UnprocessedQueryExecutionIdList = (output, context) => {
|
|
3381
|
-
|
|
2790
|
+
const retVal = (output || [])
|
|
3382
2791
|
.filter((e) => e != null)
|
|
3383
2792
|
.map((entry) => {
|
|
3384
2793
|
if (entry === null) {
|
|
@@ -3386,6 +2795,7 @@ const deserializeAws_json1_1UnprocessedQueryExecutionIdList = (output, context)
|
|
|
3386
2795
|
}
|
|
3387
2796
|
return deserializeAws_json1_1UnprocessedQueryExecutionId(entry, context);
|
|
3388
2797
|
});
|
|
2798
|
+
return retVal;
|
|
3389
2799
|
};
|
|
3390
2800
|
const deserializeAws_json1_1UntagResourceOutput = (output, context) => {
|
|
3391
2801
|
return {};
|
|
@@ -3427,7 +2837,7 @@ const deserializeAws_json1_1WorkGroupConfiguration = (output, context) => {
|
|
|
3427
2837
|
};
|
|
3428
2838
|
};
|
|
3429
2839
|
const deserializeAws_json1_1WorkGroupsList = (output, context) => {
|
|
3430
|
-
|
|
2840
|
+
const retVal = (output || [])
|
|
3431
2841
|
.filter((e) => e != null)
|
|
3432
2842
|
.map((entry) => {
|
|
3433
2843
|
if (entry === null) {
|
|
@@ -3435,6 +2845,7 @@ const deserializeAws_json1_1WorkGroupsList = (output, context) => {
|
|
|
3435
2845
|
}
|
|
3436
2846
|
return deserializeAws_json1_1WorkGroupSummary(entry, context);
|
|
3437
2847
|
});
|
|
2848
|
+
return retVal;
|
|
3438
2849
|
};
|
|
3439
2850
|
const deserializeAws_json1_1WorkGroupSummary = (output, context) => {
|
|
3440
2851
|
return {
|