@aws-amplify/predictions 4.0.34-cloud-logging.7 → 4.0.34-cloud-logging.8

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 CHANGED
@@ -3,105 +3,76 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [4.0.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.32...@aws-amplify/predictions@4.0.33) (2022-02-28)
6
+ ## [4.0.38](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.37...@aws-amplify/predictions@4.0.38) (2022-04-14)
7
7
 
8
8
  **Note:** Version bump only for package @aws-amplify/predictions
9
9
 
10
+ ## [4.0.37](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.36...@aws-amplify/predictions@4.0.37) (2022-04-04)
10
11
 
12
+ **Note:** Version bump only for package @aws-amplify/predictions
11
13
 
12
-
13
-
14
- ## [4.0.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.31...@aws-amplify/predictions@4.0.32) (2022-02-03)
14
+ ## [4.0.36](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.35...@aws-amplify/predictions@4.0.36) (2022-03-28)
15
15
 
16
16
  **Note:** Version bump only for package @aws-amplify/predictions
17
17
 
18
+ ## [4.0.35](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.34...@aws-amplify/predictions@4.0.35) (2022-03-22)
18
19
 
20
+ **Note:** Version bump only for package @aws-amplify/predictions
19
21
 
22
+ ## [4.0.34](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.33...@aws-amplify/predictions@4.0.34) (2022-03-10)
20
23
 
24
+ **Note:** Version bump only for package @aws-amplify/predictions
21
25
 
22
- ## [4.0.31](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.30...@aws-amplify/predictions@4.0.31) (2022-01-27)
26
+ ## [4.0.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.32...@aws-amplify/predictions@4.0.33) (2022-02-28)
23
27
 
24
28
  **Note:** Version bump only for package @aws-amplify/predictions
25
29
 
30
+ ## [4.0.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.31...@aws-amplify/predictions@4.0.32) (2022-02-03)
26
31
 
32
+ **Note:** Version bump only for package @aws-amplify/predictions
27
33
 
34
+ ## [4.0.31](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.30...@aws-amplify/predictions@4.0.31) (2022-01-27)
28
35
 
36
+ **Note:** Version bump only for package @aws-amplify/predictions
29
37
 
30
38
  ## [4.0.30](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.29...@aws-amplify/predictions@4.0.30) (2022-01-07)
31
39
 
32
40
  **Note:** Version bump only for package @aws-amplify/predictions
33
41
 
34
-
35
-
36
-
37
-
38
42
  ## [4.0.29](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.28...@aws-amplify/predictions@4.0.29) (2021-12-16)
39
43
 
40
44
  **Note:** Version bump only for package @aws-amplify/predictions
41
45
 
42
-
43
-
44
-
45
-
46
46
  ## [4.0.28](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.27...@aws-amplify/predictions@4.0.28) (2021-12-03)
47
47
 
48
48
  **Note:** Version bump only for package @aws-amplify/predictions
49
49
 
50
-
51
-
52
-
53
-
54
50
  ## [4.0.27](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.26...@aws-amplify/predictions@4.0.27) (2021-12-02)
55
51
 
56
52
  **Note:** Version bump only for package @aws-amplify/predictions
57
53
 
58
-
59
-
60
-
61
-
62
54
  ## [4.0.26](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.25...@aws-amplify/predictions@4.0.26) (2021-11-18)
63
55
 
64
56
  **Note:** Version bump only for package @aws-amplify/predictions
65
57
 
66
-
67
-
68
-
69
-
70
58
  ## [4.0.25](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.24...@aws-amplify/predictions@4.0.25) (2021-11-16)
71
59
 
72
60
  **Note:** Version bump only for package @aws-amplify/predictions
73
61
 
74
-
75
-
76
-
77
-
78
62
  ## [4.0.24](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.23...@aws-amplify/predictions@4.0.24) (2021-11-12)
79
63
 
80
64
  **Note:** Version bump only for package @aws-amplify/predictions
81
65
 
82
-
83
-
84
-
85
-
86
66
  ## [4.0.23](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.22...@aws-amplify/predictions@4.0.23) (2021-11-09)
87
67
 
88
-
89
68
  ### Reverts
90
69
 
91
- * uuid dependency upgrade ([#9159](https://github.com/aws-amplify/amplify-js/issues/9159)) ([4ef8aa9](https://github.com/aws-amplify/amplify-js/commit/4ef8aa9c7c25dbe921fd02b6205b8defb93fbaec))
92
-
93
-
94
-
95
-
70
+ - uuid dependency upgrade ([#9159](https://github.com/aws-amplify/amplify-js/issues/9159)) ([4ef8aa9](https://github.com/aws-amplify/amplify-js/commit/4ef8aa9c7c25dbe921fd02b6205b8defb93fbaec))
96
71
 
97
72
  ## [4.0.22](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.21...@aws-amplify/predictions@4.0.22) (2021-10-28)
98
73
 
99
74
  **Note:** Version bump only for package @aws-amplify/predictions
100
75
 
101
-
102
-
103
-
104
-
105
76
  ## [4.0.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.20...@aws-amplify/predictions@4.0.21) (2021-10-21)
106
77
 
107
78
  **Note:** Version bump only for package @aws-amplify/predictions
@@ -98027,6 +98027,10 @@ function isBlob(body) {
98027
98027
  return typeof Blob !== 'undefined' && body instanceof Blob;
98028
98028
  }
98029
98029
 
98030
+ function hasErrorResponse(error) {
98031
+ return typeof error !== 'undefined' && Object.prototype.hasOwnProperty.call(error, 'response') && typeof error.response !== 'undefined' && Object.prototype.hasOwnProperty.call(error.response, 'status') && typeof error.response.status === 'number';
98032
+ }
98033
+
98030
98034
  var normalizeHeaders = function normalizeHeaders(headers, normalizedName) {
98031
98035
  var e_1, _a;
98032
98036
 
@@ -98170,16 +98174,20 @@ function () {
98170
98174
  })
98171
98175
  };
98172
98176
  })["catch"](function (error) {
98173
- var _a, _b, _c; // Error
98177
+ var _a, _b; // Error
98174
98178
 
98175
98179
 
98176
98180
  if (error.message !== _common_StorageErrorStrings__WEBPACK_IMPORTED_MODULE_4__["AWSS3ProviderUploadErrorStrings"].UPLOAD_PAUSED_MESSAGE) {
98177
98181
  logger.error(error.message);
98178
98182
  } // for axios' cancel error, we should re-throw it back so it's not considered an s3client error
98179
- // if we return empty, or an abitrary error HttpResponse, it will be hard to debug down the line
98183
+ // if we return empty, or an abitrary error HttpResponse, it will be hard to debug down the line.
98184
+ //
98185
+ // for errors that does not have a 'response' object, it's very likely that it is an unexpected error for
98186
+ // example a disconnect. Without it we cannot meaningfully reconstruct a HttpResponse, and the AWS SDK might
98187
+ // consider the request successful by mistake. In this case we should also re-throw the error.
98180
98188
 
98181
98189
 
98182
- if (axios__WEBPACK_IMPORTED_MODULE_2___default.a.isCancel(error)) {
98190
+ if (axios__WEBPACK_IMPORTED_MODULE_2___default.a.isCancel(error) || !hasErrorResponse(error)) {
98183
98191
  throw error;
98184
98192
  } // otherwise, we should re-construct an HttpResponse from the error, so that it can be passed down to other
98185
98193
  // aws sdk middleware (e.g retry, clock skew correction, error message serializing)
@@ -98187,9 +98195,9 @@ function () {
98187
98195
 
98188
98196
  return {
98189
98197
  response: new _aws_sdk_protocol_http__WEBPACK_IMPORTED_MODULE_0__["HttpResponse"]({
98190
- statusCode: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
98191
- body: (_b = error.response) === null || _b === void 0 ? void 0 : _b.data,
98192
- headers: (_c = error.response) === null || _c === void 0 ? void 0 : _c.headers
98198
+ statusCode: error.response.status,
98199
+ body: (_a = error.response) === null || _a === void 0 ? void 0 : _a.data,
98200
+ headers: (_b = error.response) === null || _b === void 0 ? void 0 : _b.headers
98193
98201
  })
98194
98202
  };
98195
98203
  }), requestTimeout(requestTimeoutInMs)];