@aws-sdk/client-sqs 3.312.0 → 3.315.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.
@@ -234,7 +234,7 @@ const de_AddPermissionCommand = async (output, context) => {
234
234
  const response = {
235
235
  $metadata: deserializeMetadata(output),
236
236
  };
237
- return Promise.resolve(response);
237
+ return response;
238
238
  };
239
239
  exports.de_AddPermissionCommand = de_AddPermissionCommand;
240
240
  const de_AddPermissionCommandError = async (output, context) => {
@@ -249,10 +249,9 @@ const de_AddPermissionCommandError = async (output, context) => {
249
249
  throw await de_OverLimitRes(parsedOutput, context);
250
250
  default:
251
251
  const parsedBody = parsedOutput.body;
252
- (0, smithy_client_1.throwDefaultError)({
252
+ return throwDefaultError({
253
253
  output,
254
254
  parsedBody: parsedBody.Error,
255
- exceptionCtor: SQSServiceException_1.SQSServiceException,
256
255
  errorCode,
257
256
  });
258
257
  }
@@ -265,7 +264,7 @@ const de_ChangeMessageVisibilityCommand = async (output, context) => {
265
264
  const response = {
266
265
  $metadata: deserializeMetadata(output),
267
266
  };
268
- return Promise.resolve(response);
267
+ return response;
269
268
  };
270
269
  exports.de_ChangeMessageVisibilityCommand = de_ChangeMessageVisibilityCommand;
271
270
  const de_ChangeMessageVisibilityCommandError = async (output, context) => {
@@ -283,10 +282,9 @@ const de_ChangeMessageVisibilityCommandError = async (output, context) => {
283
282
  throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
284
283
  default:
285
284
  const parsedBody = parsedOutput.body;
286
- (0, smithy_client_1.throwDefaultError)({
285
+ return throwDefaultError({
287
286
  output,
288
287
  parsedBody: parsedBody.Error,
289
- exceptionCtor: SQSServiceException_1.SQSServiceException,
290
288
  errorCode,
291
289
  });
292
290
  }
@@ -302,7 +300,7 @@ const de_ChangeMessageVisibilityBatchCommand = async (output, context) => {
302
300
  $metadata: deserializeMetadata(output),
303
301
  ...contents,
304
302
  };
305
- return Promise.resolve(response);
303
+ return response;
306
304
  };
307
305
  exports.de_ChangeMessageVisibilityBatchCommand = de_ChangeMessageVisibilityBatchCommand;
308
306
  const de_ChangeMessageVisibilityBatchCommandError = async (output, context) => {
@@ -326,10 +324,9 @@ const de_ChangeMessageVisibilityBatchCommandError = async (output, context) => {
326
324
  throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
327
325
  default:
328
326
  const parsedBody = parsedOutput.body;
329
- (0, smithy_client_1.throwDefaultError)({
327
+ return throwDefaultError({
330
328
  output,
331
329
  parsedBody: parsedBody.Error,
332
- exceptionCtor: SQSServiceException_1.SQSServiceException,
333
330
  errorCode,
334
331
  });
335
332
  }
@@ -345,7 +342,7 @@ const de_CreateQueueCommand = async (output, context) => {
345
342
  $metadata: deserializeMetadata(output),
346
343
  ...contents,
347
344
  };
348
- return Promise.resolve(response);
345
+ return response;
349
346
  };
350
347
  exports.de_CreateQueueCommand = de_CreateQueueCommand;
351
348
  const de_CreateQueueCommandError = async (output, context) => {
@@ -363,10 +360,9 @@ const de_CreateQueueCommandError = async (output, context) => {
363
360
  throw await de_QueueNameExistsRes(parsedOutput, context);
364
361
  default:
365
362
  const parsedBody = parsedOutput.body;
366
- (0, smithy_client_1.throwDefaultError)({
363
+ return throwDefaultError({
367
364
  output,
368
365
  parsedBody: parsedBody.Error,
369
- exceptionCtor: SQSServiceException_1.SQSServiceException,
370
366
  errorCode,
371
367
  });
372
368
  }
@@ -379,7 +375,7 @@ const de_DeleteMessageCommand = async (output, context) => {
379
375
  const response = {
380
376
  $metadata: deserializeMetadata(output),
381
377
  };
382
- return Promise.resolve(response);
378
+ return response;
383
379
  };
384
380
  exports.de_DeleteMessageCommand = de_DeleteMessageCommand;
385
381
  const de_DeleteMessageCommandError = async (output, context) => {
@@ -397,10 +393,9 @@ const de_DeleteMessageCommandError = async (output, context) => {
397
393
  throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
398
394
  default:
399
395
  const parsedBody = parsedOutput.body;
400
- (0, smithy_client_1.throwDefaultError)({
396
+ return throwDefaultError({
401
397
  output,
402
398
  parsedBody: parsedBody.Error,
403
- exceptionCtor: SQSServiceException_1.SQSServiceException,
404
399
  errorCode,
405
400
  });
406
401
  }
@@ -416,7 +411,7 @@ const de_DeleteMessageBatchCommand = async (output, context) => {
416
411
  $metadata: deserializeMetadata(output),
417
412
  ...contents,
418
413
  };
419
- return Promise.resolve(response);
414
+ return response;
420
415
  };
421
416
  exports.de_DeleteMessageBatchCommand = de_DeleteMessageBatchCommand;
422
417
  const de_DeleteMessageBatchCommandError = async (output, context) => {
@@ -440,10 +435,9 @@ const de_DeleteMessageBatchCommandError = async (output, context) => {
440
435
  throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
441
436
  default:
442
437
  const parsedBody = parsedOutput.body;
443
- (0, smithy_client_1.throwDefaultError)({
438
+ return throwDefaultError({
444
439
  output,
445
440
  parsedBody: parsedBody.Error,
446
- exceptionCtor: SQSServiceException_1.SQSServiceException,
447
441
  errorCode,
448
442
  });
449
443
  }
@@ -456,7 +450,7 @@ const de_DeleteQueueCommand = async (output, context) => {
456
450
  const response = {
457
451
  $metadata: deserializeMetadata(output),
458
452
  };
459
- return Promise.resolve(response);
453
+ return response;
460
454
  };
461
455
  exports.de_DeleteQueueCommand = de_DeleteQueueCommand;
462
456
  const de_DeleteQueueCommandError = async (output, context) => {
@@ -466,10 +460,9 @@ const de_DeleteQueueCommandError = async (output, context) => {
466
460
  };
467
461
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
468
462
  const parsedBody = parsedOutput.body;
469
- (0, smithy_client_1.throwDefaultError)({
463
+ return throwDefaultError({
470
464
  output,
471
465
  parsedBody: parsedBody.Error,
472
- exceptionCtor: SQSServiceException_1.SQSServiceException,
473
466
  errorCode,
474
467
  });
475
468
  };
@@ -484,7 +477,7 @@ const de_GetQueueAttributesCommand = async (output, context) => {
484
477
  $metadata: deserializeMetadata(output),
485
478
  ...contents,
486
479
  };
487
- return Promise.resolve(response);
480
+ return response;
488
481
  };
489
482
  exports.de_GetQueueAttributesCommand = de_GetQueueAttributesCommand;
490
483
  const de_GetQueueAttributesCommandError = async (output, context) => {
@@ -499,10 +492,9 @@ const de_GetQueueAttributesCommandError = async (output, context) => {
499
492
  throw await de_InvalidAttributeNameRes(parsedOutput, context);
500
493
  default:
501
494
  const parsedBody = parsedOutput.body;
502
- (0, smithy_client_1.throwDefaultError)({
495
+ return throwDefaultError({
503
496
  output,
504
497
  parsedBody: parsedBody.Error,
505
- exceptionCtor: SQSServiceException_1.SQSServiceException,
506
498
  errorCode,
507
499
  });
508
500
  }
@@ -518,7 +510,7 @@ const de_GetQueueUrlCommand = async (output, context) => {
518
510
  $metadata: deserializeMetadata(output),
519
511
  ...contents,
520
512
  };
521
- return Promise.resolve(response);
513
+ return response;
522
514
  };
523
515
  exports.de_GetQueueUrlCommand = de_GetQueueUrlCommand;
524
516
  const de_GetQueueUrlCommandError = async (output, context) => {
@@ -533,10 +525,9 @@ const de_GetQueueUrlCommandError = async (output, context) => {
533
525
  throw await de_QueueDoesNotExistRes(parsedOutput, context);
534
526
  default:
535
527
  const parsedBody = parsedOutput.body;
536
- (0, smithy_client_1.throwDefaultError)({
528
+ return throwDefaultError({
537
529
  output,
538
530
  parsedBody: parsedBody.Error,
539
- exceptionCtor: SQSServiceException_1.SQSServiceException,
540
531
  errorCode,
541
532
  });
542
533
  }
@@ -552,7 +543,7 @@ const de_ListDeadLetterSourceQueuesCommand = async (output, context) => {
552
543
  $metadata: deserializeMetadata(output),
553
544
  ...contents,
554
545
  };
555
- return Promise.resolve(response);
546
+ return response;
556
547
  };
557
548
  exports.de_ListDeadLetterSourceQueuesCommand = de_ListDeadLetterSourceQueuesCommand;
558
549
  const de_ListDeadLetterSourceQueuesCommandError = async (output, context) => {
@@ -567,10 +558,9 @@ const de_ListDeadLetterSourceQueuesCommandError = async (output, context) => {
567
558
  throw await de_QueueDoesNotExistRes(parsedOutput, context);
568
559
  default:
569
560
  const parsedBody = parsedOutput.body;
570
- (0, smithy_client_1.throwDefaultError)({
561
+ return throwDefaultError({
571
562
  output,
572
563
  parsedBody: parsedBody.Error,
573
- exceptionCtor: SQSServiceException_1.SQSServiceException,
574
564
  errorCode,
575
565
  });
576
566
  }
@@ -586,7 +576,7 @@ const de_ListQueuesCommand = async (output, context) => {
586
576
  $metadata: deserializeMetadata(output),
587
577
  ...contents,
588
578
  };
589
- return Promise.resolve(response);
579
+ return response;
590
580
  };
591
581
  exports.de_ListQueuesCommand = de_ListQueuesCommand;
592
582
  const de_ListQueuesCommandError = async (output, context) => {
@@ -596,10 +586,9 @@ const de_ListQueuesCommandError = async (output, context) => {
596
586
  };
597
587
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
598
588
  const parsedBody = parsedOutput.body;
599
- (0, smithy_client_1.throwDefaultError)({
589
+ return throwDefaultError({
600
590
  output,
601
591
  parsedBody: parsedBody.Error,
602
- exceptionCtor: SQSServiceException_1.SQSServiceException,
603
592
  errorCode,
604
593
  });
605
594
  };
@@ -614,7 +603,7 @@ const de_ListQueueTagsCommand = async (output, context) => {
614
603
  $metadata: deserializeMetadata(output),
615
604
  ...contents,
616
605
  };
617
- return Promise.resolve(response);
606
+ return response;
618
607
  };
619
608
  exports.de_ListQueueTagsCommand = de_ListQueueTagsCommand;
620
609
  const de_ListQueueTagsCommandError = async (output, context) => {
@@ -624,10 +613,9 @@ const de_ListQueueTagsCommandError = async (output, context) => {
624
613
  };
625
614
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
626
615
  const parsedBody = parsedOutput.body;
627
- (0, smithy_client_1.throwDefaultError)({
616
+ return throwDefaultError({
628
617
  output,
629
618
  parsedBody: parsedBody.Error,
630
- exceptionCtor: SQSServiceException_1.SQSServiceException,
631
619
  errorCode,
632
620
  });
633
621
  };
@@ -639,7 +627,7 @@ const de_PurgeQueueCommand = async (output, context) => {
639
627
  const response = {
640
628
  $metadata: deserializeMetadata(output),
641
629
  };
642
- return Promise.resolve(response);
630
+ return response;
643
631
  };
644
632
  exports.de_PurgeQueueCommand = de_PurgeQueueCommand;
645
633
  const de_PurgeQueueCommandError = async (output, context) => {
@@ -657,10 +645,9 @@ const de_PurgeQueueCommandError = async (output, context) => {
657
645
  throw await de_PurgeQueueInProgressRes(parsedOutput, context);
658
646
  default:
659
647
  const parsedBody = parsedOutput.body;
660
- (0, smithy_client_1.throwDefaultError)({
648
+ return throwDefaultError({
661
649
  output,
662
650
  parsedBody: parsedBody.Error,
663
- exceptionCtor: SQSServiceException_1.SQSServiceException,
664
651
  errorCode,
665
652
  });
666
653
  }
@@ -676,7 +663,7 @@ const de_ReceiveMessageCommand = async (output, context) => {
676
663
  $metadata: deserializeMetadata(output),
677
664
  ...contents,
678
665
  };
679
- return Promise.resolve(response);
666
+ return response;
680
667
  };
681
668
  exports.de_ReceiveMessageCommand = de_ReceiveMessageCommand;
682
669
  const de_ReceiveMessageCommandError = async (output, context) => {
@@ -691,10 +678,9 @@ const de_ReceiveMessageCommandError = async (output, context) => {
691
678
  throw await de_OverLimitRes(parsedOutput, context);
692
679
  default:
693
680
  const parsedBody = parsedOutput.body;
694
- (0, smithy_client_1.throwDefaultError)({
681
+ return throwDefaultError({
695
682
  output,
696
683
  parsedBody: parsedBody.Error,
697
- exceptionCtor: SQSServiceException_1.SQSServiceException,
698
684
  errorCode,
699
685
  });
700
686
  }
@@ -707,7 +693,7 @@ const de_RemovePermissionCommand = async (output, context) => {
707
693
  const response = {
708
694
  $metadata: deserializeMetadata(output),
709
695
  };
710
- return Promise.resolve(response);
696
+ return response;
711
697
  };
712
698
  exports.de_RemovePermissionCommand = de_RemovePermissionCommand;
713
699
  const de_RemovePermissionCommandError = async (output, context) => {
@@ -717,10 +703,9 @@ const de_RemovePermissionCommandError = async (output, context) => {
717
703
  };
718
704
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
719
705
  const parsedBody = parsedOutput.body;
720
- (0, smithy_client_1.throwDefaultError)({
706
+ return throwDefaultError({
721
707
  output,
722
708
  parsedBody: parsedBody.Error,
723
- exceptionCtor: SQSServiceException_1.SQSServiceException,
724
709
  errorCode,
725
710
  });
726
711
  };
@@ -735,7 +720,7 @@ const de_SendMessageCommand = async (output, context) => {
735
720
  $metadata: deserializeMetadata(output),
736
721
  ...contents,
737
722
  };
738
- return Promise.resolve(response);
723
+ return response;
739
724
  };
740
725
  exports.de_SendMessageCommand = de_SendMessageCommand;
741
726
  const de_SendMessageCommandError = async (output, context) => {
@@ -753,10 +738,9 @@ const de_SendMessageCommandError = async (output, context) => {
753
738
  throw await de_InvalidMessageContentsRes(parsedOutput, context);
754
739
  default:
755
740
  const parsedBody = parsedOutput.body;
756
- (0, smithy_client_1.throwDefaultError)({
741
+ return throwDefaultError({
757
742
  output,
758
743
  parsedBody: parsedBody.Error,
759
- exceptionCtor: SQSServiceException_1.SQSServiceException,
760
744
  errorCode,
761
745
  });
762
746
  }
@@ -772,7 +756,7 @@ const de_SendMessageBatchCommand = async (output, context) => {
772
756
  $metadata: deserializeMetadata(output),
773
757
  ...contents,
774
758
  };
775
- return Promise.resolve(response);
759
+ return response;
776
760
  };
777
761
  exports.de_SendMessageBatchCommand = de_SendMessageBatchCommand;
778
762
  const de_SendMessageBatchCommandError = async (output, context) => {
@@ -802,10 +786,9 @@ const de_SendMessageBatchCommandError = async (output, context) => {
802
786
  throw await de_UnsupportedOperationRes(parsedOutput, context);
803
787
  default:
804
788
  const parsedBody = parsedOutput.body;
805
- (0, smithy_client_1.throwDefaultError)({
789
+ return throwDefaultError({
806
790
  output,
807
791
  parsedBody: parsedBody.Error,
808
- exceptionCtor: SQSServiceException_1.SQSServiceException,
809
792
  errorCode,
810
793
  });
811
794
  }
@@ -818,7 +801,7 @@ const de_SetQueueAttributesCommand = async (output, context) => {
818
801
  const response = {
819
802
  $metadata: deserializeMetadata(output),
820
803
  };
821
- return Promise.resolve(response);
804
+ return response;
822
805
  };
823
806
  exports.de_SetQueueAttributesCommand = de_SetQueueAttributesCommand;
824
807
  const de_SetQueueAttributesCommandError = async (output, context) => {
@@ -833,10 +816,9 @@ const de_SetQueueAttributesCommandError = async (output, context) => {
833
816
  throw await de_InvalidAttributeNameRes(parsedOutput, context);
834
817
  default:
835
818
  const parsedBody = parsedOutput.body;
836
- (0, smithy_client_1.throwDefaultError)({
819
+ return throwDefaultError({
837
820
  output,
838
821
  parsedBody: parsedBody.Error,
839
- exceptionCtor: SQSServiceException_1.SQSServiceException,
840
822
  errorCode,
841
823
  });
842
824
  }
@@ -849,7 +831,7 @@ const de_TagQueueCommand = async (output, context) => {
849
831
  const response = {
850
832
  $metadata: deserializeMetadata(output),
851
833
  };
852
- return Promise.resolve(response);
834
+ return response;
853
835
  };
854
836
  exports.de_TagQueueCommand = de_TagQueueCommand;
855
837
  const de_TagQueueCommandError = async (output, context) => {
@@ -859,10 +841,9 @@ const de_TagQueueCommandError = async (output, context) => {
859
841
  };
860
842
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
861
843
  const parsedBody = parsedOutput.body;
862
- (0, smithy_client_1.throwDefaultError)({
844
+ return throwDefaultError({
863
845
  output,
864
846
  parsedBody: parsedBody.Error,
865
- exceptionCtor: SQSServiceException_1.SQSServiceException,
866
847
  errorCode,
867
848
  });
868
849
  };
@@ -874,7 +855,7 @@ const de_UntagQueueCommand = async (output, context) => {
874
855
  const response = {
875
856
  $metadata: deserializeMetadata(output),
876
857
  };
877
- return Promise.resolve(response);
858
+ return response;
878
859
  };
879
860
  exports.de_UntagQueueCommand = de_UntagQueueCommand;
880
861
  const de_UntagQueueCommandError = async (output, context) => {
@@ -884,10 +865,9 @@ const de_UntagQueueCommandError = async (output, context) => {
884
865
  };
885
866
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
886
867
  const parsedBody = parsedOutput.body;
887
- (0, smithy_client_1.throwDefaultError)({
868
+ return throwDefaultError({
888
869
  output,
889
870
  parsedBody: parsedBody.Error,
890
- exceptionCtor: SQSServiceException_1.SQSServiceException,
891
871
  errorCode,
892
872
  });
893
873
  };
@@ -2080,6 +2060,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2080
2060
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2081
2061
  };
2082
2062
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2063
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(SQSServiceException_1.SQSServiceException);
2083
2064
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2084
2065
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2085
2066
  const contents = {
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { decorateServiceException as __decorateServiceException, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { XMLParser } from "fast-xml-parser";
4
4
  import { BatchEntryIdsNotDistinct, BatchRequestTooLong, EmptyBatchRequest, InvalidAttributeName, InvalidBatchEntryId, InvalidIdFormat, InvalidMessageContents, MessageNotInflight, OverLimit, PurgeQueueInProgress, QueueDeletedRecently, QueueDoesNotExist, QueueNameExists, ReceiptHandleIsInvalid, TooManyEntriesInBatchRequest, UnsupportedOperation, } from "../models/models_0";
5
5
  import { SQSServiceException as __BaseException } from "../models/SQSServiceException";
@@ -211,7 +211,7 @@ export const de_AddPermissionCommand = async (output, context) => {
211
211
  const response = {
212
212
  $metadata: deserializeMetadata(output),
213
213
  };
214
- return Promise.resolve(response);
214
+ return response;
215
215
  };
216
216
  const de_AddPermissionCommandError = async (output, context) => {
217
217
  const parsedOutput = {
@@ -225,10 +225,9 @@ const de_AddPermissionCommandError = async (output, context) => {
225
225
  throw await de_OverLimitRes(parsedOutput, context);
226
226
  default:
227
227
  const parsedBody = parsedOutput.body;
228
- throwDefaultError({
228
+ return throwDefaultError({
229
229
  output,
230
230
  parsedBody: parsedBody.Error,
231
- exceptionCtor: __BaseException,
232
231
  errorCode,
233
232
  });
234
233
  }
@@ -241,7 +240,7 @@ export const de_ChangeMessageVisibilityCommand = async (output, context) => {
241
240
  const response = {
242
241
  $metadata: deserializeMetadata(output),
243
242
  };
244
- return Promise.resolve(response);
243
+ return response;
245
244
  };
246
245
  const de_ChangeMessageVisibilityCommandError = async (output, context) => {
247
246
  const parsedOutput = {
@@ -258,10 +257,9 @@ const de_ChangeMessageVisibilityCommandError = async (output, context) => {
258
257
  throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
259
258
  default:
260
259
  const parsedBody = parsedOutput.body;
261
- throwDefaultError({
260
+ return throwDefaultError({
262
261
  output,
263
262
  parsedBody: parsedBody.Error,
264
- exceptionCtor: __BaseException,
265
263
  errorCode,
266
264
  });
267
265
  }
@@ -277,7 +275,7 @@ export const de_ChangeMessageVisibilityBatchCommand = async (output, context) =>
277
275
  $metadata: deserializeMetadata(output),
278
276
  ...contents,
279
277
  };
280
- return Promise.resolve(response);
278
+ return response;
281
279
  };
282
280
  const de_ChangeMessageVisibilityBatchCommandError = async (output, context) => {
283
281
  const parsedOutput = {
@@ -300,10 +298,9 @@ const de_ChangeMessageVisibilityBatchCommandError = async (output, context) => {
300
298
  throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
301
299
  default:
302
300
  const parsedBody = parsedOutput.body;
303
- throwDefaultError({
301
+ return throwDefaultError({
304
302
  output,
305
303
  parsedBody: parsedBody.Error,
306
- exceptionCtor: __BaseException,
307
304
  errorCode,
308
305
  });
309
306
  }
@@ -319,7 +316,7 @@ export const de_CreateQueueCommand = async (output, context) => {
319
316
  $metadata: deserializeMetadata(output),
320
317
  ...contents,
321
318
  };
322
- return Promise.resolve(response);
319
+ return response;
323
320
  };
324
321
  const de_CreateQueueCommandError = async (output, context) => {
325
322
  const parsedOutput = {
@@ -336,10 +333,9 @@ const de_CreateQueueCommandError = async (output, context) => {
336
333
  throw await de_QueueNameExistsRes(parsedOutput, context);
337
334
  default:
338
335
  const parsedBody = parsedOutput.body;
339
- throwDefaultError({
336
+ return throwDefaultError({
340
337
  output,
341
338
  parsedBody: parsedBody.Error,
342
- exceptionCtor: __BaseException,
343
339
  errorCode,
344
340
  });
345
341
  }
@@ -352,7 +348,7 @@ export const de_DeleteMessageCommand = async (output, context) => {
352
348
  const response = {
353
349
  $metadata: deserializeMetadata(output),
354
350
  };
355
- return Promise.resolve(response);
351
+ return response;
356
352
  };
357
353
  const de_DeleteMessageCommandError = async (output, context) => {
358
354
  const parsedOutput = {
@@ -369,10 +365,9 @@ const de_DeleteMessageCommandError = async (output, context) => {
369
365
  throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
370
366
  default:
371
367
  const parsedBody = parsedOutput.body;
372
- throwDefaultError({
368
+ return throwDefaultError({
373
369
  output,
374
370
  parsedBody: parsedBody.Error,
375
- exceptionCtor: __BaseException,
376
371
  errorCode,
377
372
  });
378
373
  }
@@ -388,7 +383,7 @@ export const de_DeleteMessageBatchCommand = async (output, context) => {
388
383
  $metadata: deserializeMetadata(output),
389
384
  ...contents,
390
385
  };
391
- return Promise.resolve(response);
386
+ return response;
392
387
  };
393
388
  const de_DeleteMessageBatchCommandError = async (output, context) => {
394
389
  const parsedOutput = {
@@ -411,10 +406,9 @@ const de_DeleteMessageBatchCommandError = async (output, context) => {
411
406
  throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
412
407
  default:
413
408
  const parsedBody = parsedOutput.body;
414
- throwDefaultError({
409
+ return throwDefaultError({
415
410
  output,
416
411
  parsedBody: parsedBody.Error,
417
- exceptionCtor: __BaseException,
418
412
  errorCode,
419
413
  });
420
414
  }
@@ -427,7 +421,7 @@ export const de_DeleteQueueCommand = async (output, context) => {
427
421
  const response = {
428
422
  $metadata: deserializeMetadata(output),
429
423
  };
430
- return Promise.resolve(response);
424
+ return response;
431
425
  };
432
426
  const de_DeleteQueueCommandError = async (output, context) => {
433
427
  const parsedOutput = {
@@ -436,10 +430,9 @@ const de_DeleteQueueCommandError = async (output, context) => {
436
430
  };
437
431
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
438
432
  const parsedBody = parsedOutput.body;
439
- throwDefaultError({
433
+ return throwDefaultError({
440
434
  output,
441
435
  parsedBody: parsedBody.Error,
442
- exceptionCtor: __BaseException,
443
436
  errorCode,
444
437
  });
445
438
  };
@@ -454,7 +447,7 @@ export const de_GetQueueAttributesCommand = async (output, context) => {
454
447
  $metadata: deserializeMetadata(output),
455
448
  ...contents,
456
449
  };
457
- return Promise.resolve(response);
450
+ return response;
458
451
  };
459
452
  const de_GetQueueAttributesCommandError = async (output, context) => {
460
453
  const parsedOutput = {
@@ -468,10 +461,9 @@ const de_GetQueueAttributesCommandError = async (output, context) => {
468
461
  throw await de_InvalidAttributeNameRes(parsedOutput, context);
469
462
  default:
470
463
  const parsedBody = parsedOutput.body;
471
- throwDefaultError({
464
+ return throwDefaultError({
472
465
  output,
473
466
  parsedBody: parsedBody.Error,
474
- exceptionCtor: __BaseException,
475
467
  errorCode,
476
468
  });
477
469
  }
@@ -487,7 +479,7 @@ export const de_GetQueueUrlCommand = async (output, context) => {
487
479
  $metadata: deserializeMetadata(output),
488
480
  ...contents,
489
481
  };
490
- return Promise.resolve(response);
482
+ return response;
491
483
  };
492
484
  const de_GetQueueUrlCommandError = async (output, context) => {
493
485
  const parsedOutput = {
@@ -501,10 +493,9 @@ const de_GetQueueUrlCommandError = async (output, context) => {
501
493
  throw await de_QueueDoesNotExistRes(parsedOutput, context);
502
494
  default:
503
495
  const parsedBody = parsedOutput.body;
504
- throwDefaultError({
496
+ return throwDefaultError({
505
497
  output,
506
498
  parsedBody: parsedBody.Error,
507
- exceptionCtor: __BaseException,
508
499
  errorCode,
509
500
  });
510
501
  }
@@ -520,7 +511,7 @@ export const de_ListDeadLetterSourceQueuesCommand = async (output, context) => {
520
511
  $metadata: deserializeMetadata(output),
521
512
  ...contents,
522
513
  };
523
- return Promise.resolve(response);
514
+ return response;
524
515
  };
525
516
  const de_ListDeadLetterSourceQueuesCommandError = async (output, context) => {
526
517
  const parsedOutput = {
@@ -534,10 +525,9 @@ const de_ListDeadLetterSourceQueuesCommandError = async (output, context) => {
534
525
  throw await de_QueueDoesNotExistRes(parsedOutput, context);
535
526
  default:
536
527
  const parsedBody = parsedOutput.body;
537
- throwDefaultError({
528
+ return throwDefaultError({
538
529
  output,
539
530
  parsedBody: parsedBody.Error,
540
- exceptionCtor: __BaseException,
541
531
  errorCode,
542
532
  });
543
533
  }
@@ -553,7 +543,7 @@ export const de_ListQueuesCommand = async (output, context) => {
553
543
  $metadata: deserializeMetadata(output),
554
544
  ...contents,
555
545
  };
556
- return Promise.resolve(response);
546
+ return response;
557
547
  };
558
548
  const de_ListQueuesCommandError = async (output, context) => {
559
549
  const parsedOutput = {
@@ -562,10 +552,9 @@ const de_ListQueuesCommandError = async (output, context) => {
562
552
  };
563
553
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
564
554
  const parsedBody = parsedOutput.body;
565
- throwDefaultError({
555
+ return throwDefaultError({
566
556
  output,
567
557
  parsedBody: parsedBody.Error,
568
- exceptionCtor: __BaseException,
569
558
  errorCode,
570
559
  });
571
560
  };
@@ -580,7 +569,7 @@ export const de_ListQueueTagsCommand = async (output, context) => {
580
569
  $metadata: deserializeMetadata(output),
581
570
  ...contents,
582
571
  };
583
- return Promise.resolve(response);
572
+ return response;
584
573
  };
585
574
  const de_ListQueueTagsCommandError = async (output, context) => {
586
575
  const parsedOutput = {
@@ -589,10 +578,9 @@ const de_ListQueueTagsCommandError = async (output, context) => {
589
578
  };
590
579
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
591
580
  const parsedBody = parsedOutput.body;
592
- throwDefaultError({
581
+ return throwDefaultError({
593
582
  output,
594
583
  parsedBody: parsedBody.Error,
595
- exceptionCtor: __BaseException,
596
584
  errorCode,
597
585
  });
598
586
  };
@@ -604,7 +592,7 @@ export const de_PurgeQueueCommand = async (output, context) => {
604
592
  const response = {
605
593
  $metadata: deserializeMetadata(output),
606
594
  };
607
- return Promise.resolve(response);
595
+ return response;
608
596
  };
609
597
  const de_PurgeQueueCommandError = async (output, context) => {
610
598
  const parsedOutput = {
@@ -621,10 +609,9 @@ const de_PurgeQueueCommandError = async (output, context) => {
621
609
  throw await de_PurgeQueueInProgressRes(parsedOutput, context);
622
610
  default:
623
611
  const parsedBody = parsedOutput.body;
624
- throwDefaultError({
612
+ return throwDefaultError({
625
613
  output,
626
614
  parsedBody: parsedBody.Error,
627
- exceptionCtor: __BaseException,
628
615
  errorCode,
629
616
  });
630
617
  }
@@ -640,7 +627,7 @@ export const de_ReceiveMessageCommand = async (output, context) => {
640
627
  $metadata: deserializeMetadata(output),
641
628
  ...contents,
642
629
  };
643
- return Promise.resolve(response);
630
+ return response;
644
631
  };
645
632
  const de_ReceiveMessageCommandError = async (output, context) => {
646
633
  const parsedOutput = {
@@ -654,10 +641,9 @@ const de_ReceiveMessageCommandError = async (output, context) => {
654
641
  throw await de_OverLimitRes(parsedOutput, context);
655
642
  default:
656
643
  const parsedBody = parsedOutput.body;
657
- throwDefaultError({
644
+ return throwDefaultError({
658
645
  output,
659
646
  parsedBody: parsedBody.Error,
660
- exceptionCtor: __BaseException,
661
647
  errorCode,
662
648
  });
663
649
  }
@@ -670,7 +656,7 @@ export const de_RemovePermissionCommand = async (output, context) => {
670
656
  const response = {
671
657
  $metadata: deserializeMetadata(output),
672
658
  };
673
- return Promise.resolve(response);
659
+ return response;
674
660
  };
675
661
  const de_RemovePermissionCommandError = async (output, context) => {
676
662
  const parsedOutput = {
@@ -679,10 +665,9 @@ const de_RemovePermissionCommandError = async (output, context) => {
679
665
  };
680
666
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
681
667
  const parsedBody = parsedOutput.body;
682
- throwDefaultError({
668
+ return throwDefaultError({
683
669
  output,
684
670
  parsedBody: parsedBody.Error,
685
- exceptionCtor: __BaseException,
686
671
  errorCode,
687
672
  });
688
673
  };
@@ -697,7 +682,7 @@ export const de_SendMessageCommand = async (output, context) => {
697
682
  $metadata: deserializeMetadata(output),
698
683
  ...contents,
699
684
  };
700
- return Promise.resolve(response);
685
+ return response;
701
686
  };
702
687
  const de_SendMessageCommandError = async (output, context) => {
703
688
  const parsedOutput = {
@@ -714,10 +699,9 @@ const de_SendMessageCommandError = async (output, context) => {
714
699
  throw await de_InvalidMessageContentsRes(parsedOutput, context);
715
700
  default:
716
701
  const parsedBody = parsedOutput.body;
717
- throwDefaultError({
702
+ return throwDefaultError({
718
703
  output,
719
704
  parsedBody: parsedBody.Error,
720
- exceptionCtor: __BaseException,
721
705
  errorCode,
722
706
  });
723
707
  }
@@ -733,7 +717,7 @@ export const de_SendMessageBatchCommand = async (output, context) => {
733
717
  $metadata: deserializeMetadata(output),
734
718
  ...contents,
735
719
  };
736
- return Promise.resolve(response);
720
+ return response;
737
721
  };
738
722
  const de_SendMessageBatchCommandError = async (output, context) => {
739
723
  const parsedOutput = {
@@ -762,10 +746,9 @@ const de_SendMessageBatchCommandError = async (output, context) => {
762
746
  throw await de_UnsupportedOperationRes(parsedOutput, context);
763
747
  default:
764
748
  const parsedBody = parsedOutput.body;
765
- throwDefaultError({
749
+ return throwDefaultError({
766
750
  output,
767
751
  parsedBody: parsedBody.Error,
768
- exceptionCtor: __BaseException,
769
752
  errorCode,
770
753
  });
771
754
  }
@@ -778,7 +761,7 @@ export const de_SetQueueAttributesCommand = async (output, context) => {
778
761
  const response = {
779
762
  $metadata: deserializeMetadata(output),
780
763
  };
781
- return Promise.resolve(response);
764
+ return response;
782
765
  };
783
766
  const de_SetQueueAttributesCommandError = async (output, context) => {
784
767
  const parsedOutput = {
@@ -792,10 +775,9 @@ const de_SetQueueAttributesCommandError = async (output, context) => {
792
775
  throw await de_InvalidAttributeNameRes(parsedOutput, context);
793
776
  default:
794
777
  const parsedBody = parsedOutput.body;
795
- throwDefaultError({
778
+ return throwDefaultError({
796
779
  output,
797
780
  parsedBody: parsedBody.Error,
798
- exceptionCtor: __BaseException,
799
781
  errorCode,
800
782
  });
801
783
  }
@@ -808,7 +790,7 @@ export const de_TagQueueCommand = async (output, context) => {
808
790
  const response = {
809
791
  $metadata: deserializeMetadata(output),
810
792
  };
811
- return Promise.resolve(response);
793
+ return response;
812
794
  };
813
795
  const de_TagQueueCommandError = async (output, context) => {
814
796
  const parsedOutput = {
@@ -817,10 +799,9 @@ const de_TagQueueCommandError = async (output, context) => {
817
799
  };
818
800
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
819
801
  const parsedBody = parsedOutput.body;
820
- throwDefaultError({
802
+ return throwDefaultError({
821
803
  output,
822
804
  parsedBody: parsedBody.Error,
823
- exceptionCtor: __BaseException,
824
805
  errorCode,
825
806
  });
826
807
  };
@@ -832,7 +813,7 @@ export const de_UntagQueueCommand = async (output, context) => {
832
813
  const response = {
833
814
  $metadata: deserializeMetadata(output),
834
815
  };
835
- return Promise.resolve(response);
816
+ return response;
836
817
  };
837
818
  const de_UntagQueueCommandError = async (output, context) => {
838
819
  const parsedOutput = {
@@ -841,10 +822,9 @@ const de_UntagQueueCommandError = async (output, context) => {
841
822
  };
842
823
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
843
824
  const parsedBody = parsedOutput.body;
844
- throwDefaultError({
825
+ return throwDefaultError({
845
826
  output,
846
827
  parsedBody: parsedBody.Error,
847
- exceptionCtor: __BaseException,
848
828
  errorCode,
849
829
  });
850
830
  };
@@ -2037,6 +2017,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2037
2017
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2038
2018
  };
2039
2019
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2020
+ const throwDefaultError = withBaseException(__BaseException);
2040
2021
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2041
2022
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2042
2023
  const contents = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sqs",
3
3
  "description": "AWS SDK for JavaScript Sqs Client for Node.js, Browser and React Native",
4
- "version": "3.312.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.312.0",
24
+ "@aws-sdk/client-sts": "3.315.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.315.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -42,14 +42,14 @@
42
42
  "@aws-sdk/node-config-provider": "3.310.0",
43
43
  "@aws-sdk/node-http-handler": "3.310.0",
44
44
  "@aws-sdk/protocol-http": "3.310.0",
45
- "@aws-sdk/smithy-client": "3.310.0",
45
+ "@aws-sdk/smithy-client": "3.315.0",
46
46
  "@aws-sdk/types": "3.310.0",
47
47
  "@aws-sdk/url-parser": "3.310.0",
48
48
  "@aws-sdk/util-base64": "3.310.0",
49
49
  "@aws-sdk/util-body-length-browser": "3.310.0",
50
50
  "@aws-sdk/util-body-length-node": "3.310.0",
51
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
52
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
51
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
52
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
53
53
  "@aws-sdk/util-endpoints": "3.310.0",
54
54
  "@aws-sdk/util-retry": "3.310.0",
55
55
  "@aws-sdk/util-user-agent-browser": "3.310.0",