aws-sdk 2.1658.0 → 2.1659.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/README.md +1 -1
- package/apis/acm-pca-2017-08-22.min.json +18 -17
- package/apis/acm-pca-2017-08-22.paginators.json +4 -4
- package/apis/acm-pca-2017-08-22.waiters2.json +62 -74
- package/apis/arc-zonal-shift-2022-10-30.min.json +62 -10
- package/apis/pinpoint-2016-12-01.min.json +4 -1
- package/apis/quicksight-2018-04-01.min.json +1783 -1313
- package/clients/acmpca.d.ts +39 -39
- package/clients/arczonalshift.d.ts +66 -29
- package/clients/quicksight.d.ts +609 -0
- package/dist/aws-sdk-core-react-native.js +1 -1
- package/dist/aws-sdk-react-native.js +58 -13
- package/dist/aws-sdk.js +54 -9
- package/dist/aws-sdk.min.js +7 -7
- package/lib/core.js +1 -1
- package/lib/services/s3.js +51 -6
- package/package.json +1 -1
- package/scripts/region-checker/allowlist.js +7 -7
    
        package/lib/core.js
    CHANGED
    
    
    
        package/lib/services/s3.js
    CHANGED
    
    | @@ -531,17 +531,21 @@ AWS.util.update(AWS.S3.prototype, { | |
| 531 531 | 
             
               * @api private
         | 
| 532 532 | 
             
               */
         | 
| 533 533 | 
             
              extractErrorFrom200Response: function extractErrorFrom200Response(resp) {
         | 
| 534 | 
            -
                 | 
| 534 | 
            +
                var service = this.service ? this.service : this;
         | 
| 535 | 
            +
                if (!service.is200Error(resp) && !operationsWith200StatusCodeError[resp.request.operation]) {
         | 
| 536 | 
            +
                  return;
         | 
| 537 | 
            +
                }
         | 
| 535 538 | 
             
                var httpResponse = resp.httpResponse;
         | 
| 536 | 
            -
                 | 
| 539 | 
            +
                var bodyString = httpResponse.body && httpResponse.body.toString() || '';
         | 
| 540 | 
            +
                if (bodyString && bodyString.indexOf('</Error>') === bodyString.length - 8) {
         | 
| 537 541 | 
             
                  // Response body with '<Error>...</Error>' indicates an exception.
         | 
| 538 542 | 
             
                  // Get S3 client object. In ManagedUpload, this.service refers to
         | 
| 539 543 | 
             
                  // S3 client object.
         | 
| 540 544 | 
             
                  resp.data = null;
         | 
| 541 | 
            -
                  var service = this.service ? this.service : this;
         | 
| 542 545 | 
             
                  service.extractError(resp);
         | 
| 546 | 
            +
                  resp.error.is200Error = true;
         | 
| 543 547 | 
             
                  throw resp.error;
         | 
| 544 | 
            -
                } else if (!httpResponse.body || ! | 
| 548 | 
            +
                } else if (!httpResponse.body || !bodyString.match(/<[\w_]/)) {
         | 
| 545 549 | 
             
                  // When body is empty or incomplete, S3 might stop the request on detecting client
         | 
| 546 550 | 
             
                  // side aborting the request.
         | 
| 547 551 | 
             
                  resp.data = null;
         | 
| @@ -552,13 +556,54 @@ AWS.util.update(AWS.S3.prototype, { | |
| 552 556 | 
             
                }
         | 
| 553 557 | 
             
              },
         | 
| 554 558 |  | 
| 559 | 
            +
              /**
         | 
| 560 | 
            +
               * @api private
         | 
| 561 | 
            +
               * @param resp - to evaluate.
         | 
| 562 | 
            +
               * @return true if the response has status code 200 but is an error.
         | 
| 563 | 
            +
               */
         | 
| 564 | 
            +
              is200Error: function is200Error(resp) {
         | 
| 565 | 
            +
                var code = resp && resp.httpResponse && resp.httpResponse.statusCode;
         | 
| 566 | 
            +
                if (code !== 200) {
         | 
| 567 | 
            +
                  return false;
         | 
| 568 | 
            +
                }
         | 
| 569 | 
            +
                try {
         | 
| 570 | 
            +
                  var req = resp.request;
         | 
| 571 | 
            +
                  var outputMembers = req.service.api.operations[req.operation].output.members;
         | 
| 572 | 
            +
                  var keys = Object.keys(outputMembers);
         | 
| 573 | 
            +
                  for (var i = 0; i < keys.length; ++i) {
         | 
| 574 | 
            +
                    var member = outputMembers[keys[i]];
         | 
| 575 | 
            +
                    if (member.type === 'binary' && member.isStreaming) {
         | 
| 576 | 
            +
                      return false;
         | 
| 577 | 
            +
                    }
         | 
| 578 | 
            +
                  }
         | 
| 579 | 
            +
             | 
| 580 | 
            +
                  var body = resp.httpResponse.body;
         | 
| 581 | 
            +
                  if (body && body.byteLength !== undefined) {
         | 
| 582 | 
            +
                    if (body.byteLength < 15 || body.byteLength > 3000) {
         | 
| 583 | 
            +
                      // body is too short or long to be an error message.
         | 
| 584 | 
            +
                      return false;
         | 
| 585 | 
            +
                    }
         | 
| 586 | 
            +
                  }
         | 
| 587 | 
            +
                  if (!body) {
         | 
| 588 | 
            +
                    return false;
         | 
| 589 | 
            +
                  }
         | 
| 590 | 
            +
                  var bodyString = body.toString();
         | 
| 591 | 
            +
                  if (bodyString.indexOf('</Error>') === bodyString.length - 8) {
         | 
| 592 | 
            +
                    return true;
         | 
| 593 | 
            +
                  }
         | 
| 594 | 
            +
                } catch (e) {
         | 
| 595 | 
            +
                  return false;
         | 
| 596 | 
            +
                }
         | 
| 597 | 
            +
                return false;
         | 
| 598 | 
            +
              },
         | 
| 599 | 
            +
             | 
| 555 600 | 
             
              /**
         | 
| 556 601 | 
             
               * @return [Boolean] whether the error can be retried
         | 
| 557 602 | 
             
               * @api private
         | 
| 558 603 | 
             
               */
         | 
| 559 604 | 
             
              retryableError: function retryableError(error, request) {
         | 
| 560 | 
            -
                if ( | 
| 561 | 
            -
             | 
| 605 | 
            +
                if (error.is200Error ||
         | 
| 606 | 
            +
                   (operationsWith200StatusCodeError[request.operation] && error.statusCode === 200)) {
         | 
| 562 607 | 
             
                  return true;
         | 
| 563 608 | 
             
                } else if (request._requestRegionForBucket &&
         | 
| 564 609 | 
             
                    request.service.bucketRegionCache[request._requestRegionForBucket]) {
         | 
    
        package/package.json
    CHANGED