@aws-amplify/storage 4.4.17-cloud-logging.7 → 4.4.17-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 +18 -46
- package/dist/aws-amplify-storage.js +14 -6
- package/dist/aws-amplify-storage.js.map +1 -1
- package/dist/aws-amplify-storage.min.js +1 -1
- package/dist/aws-amplify-storage.min.js.map +1 -1
- package/lib/providers/axios-http-handler.d.ts +7 -0
- package/lib/providers/axios-http-handler.js +17 -6
- package/lib/providers/axios-http-handler.js.map +1 -1
- package/lib-esm/providers/axios-http-handler.d.ts +7 -0
- package/lib-esm/providers/axios-http-handler.js +17 -6
- package/lib-esm/providers/axios-http-handler.js.map +1 -1
- package/package.json +3 -3
- package/src/providers/axios-http-handler.ts +24 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,108 +3,80 @@
|
|
|
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.4.
|
|
6
|
+
## [4.4.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.20...@aws-amplify/storage@4.4.21) (2022-04-14)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [4.4.15](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.14...@aws-amplify/storage@4.4.15) (2022-02-03)
|
|
10
|
+
## [4.4.20](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.19...@aws-amplify/storage@4.4.20) (2022-04-04)
|
|
15
11
|
|
|
16
12
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
17
13
|
|
|
14
|
+
## [4.4.19](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.18...@aws-amplify/storage@4.4.19) (2022-03-28)
|
|
18
15
|
|
|
16
|
+
### Bug Fixes
|
|
19
17
|
|
|
18
|
+
- **storage:** axios handler error handling fix ([#9587](https://github.com/aws-amplify/amplify-js/issues/9587)) ([2ceaa44](https://github.com/aws-amplify/amplify-js/commit/2ceaa44ce88c96e9121b903c0d9798e4a918df4a))
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
## [4.4.14](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.13...@aws-amplify/storage@4.4.14) (2022-01-27)
|
|
20
|
+
## [4.4.18](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.17...@aws-amplify/storage@4.4.18) (2022-03-22)
|
|
23
21
|
|
|
24
22
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
25
23
|
|
|
24
|
+
## [4.4.17](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.16...@aws-amplify/storage@4.4.17) (2022-03-10)
|
|
26
25
|
|
|
26
|
+
**Note:** Version bump only for package @aws-amplify/storage
|
|
27
27
|
|
|
28
|
+
## [4.4.16](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.15...@aws-amplify/storage@4.4.16) (2022-02-28)
|
|
28
29
|
|
|
30
|
+
**Note:** Version bump only for package @aws-amplify/storage
|
|
29
31
|
|
|
30
|
-
## [4.4.
|
|
32
|
+
## [4.4.15](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.14...@aws-amplify/storage@4.4.15) (2022-02-03)
|
|
31
33
|
|
|
32
34
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
33
35
|
|
|
36
|
+
## [4.4.14](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.13...@aws-amplify/storage@4.4.14) (2022-01-27)
|
|
34
37
|
|
|
38
|
+
**Note:** Version bump only for package @aws-amplify/storage
|
|
35
39
|
|
|
40
|
+
## [4.4.13](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.12...@aws-amplify/storage@4.4.13) (2022-01-07)
|
|
36
41
|
|
|
42
|
+
**Note:** Version bump only for package @aws-amplify/storage
|
|
37
43
|
|
|
38
44
|
## [4.4.12](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.11...@aws-amplify/storage@4.4.12) (2021-12-16)
|
|
39
45
|
|
|
40
46
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
48
|
## [4.4.11](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.10...@aws-amplify/storage@4.4.11) (2021-12-03)
|
|
47
49
|
|
|
48
50
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
52
|
## [4.4.10](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.9...@aws-amplify/storage@4.4.10) (2021-12-02)
|
|
55
53
|
|
|
56
54
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
56
|
## [4.4.9](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.8...@aws-amplify/storage@4.4.9) (2021-11-18)
|
|
63
57
|
|
|
64
58
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
60
|
## [4.4.8](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.7...@aws-amplify/storage@4.4.8) (2021-11-16)
|
|
71
61
|
|
|
72
62
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
73
63
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
64
|
## [4.4.7](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.6...@aws-amplify/storage@4.4.7) (2021-11-12)
|
|
79
65
|
|
|
80
66
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
81
67
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
68
|
## [4.4.6](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.5...@aws-amplify/storage@4.4.6) (2021-11-09)
|
|
87
69
|
|
|
88
|
-
|
|
89
70
|
### Bug Fixes
|
|
90
71
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
72
|
+
- **@aws-amplify/storage:** add useAccelerateEndpoint to create s3client ([#9144](https://github.com/aws-amplify/amplify-js/issues/9144)) ([853adc7](https://github.com/aws-amplify/amplify-js/commit/853adc7554f0a61922e3348d3626c73a5166266d))
|
|
73
|
+
- **@aws-amplify/storage:** Automatically adjust systemClockoffset in Storage ([#9115](https://github.com/aws-amplify/amplify-js/issues/9115)) ([873941c](https://github.com/aws-amplify/amplify-js/commit/873941c655d9fe87a75238eadc0ae57dacc2fa16))
|
|
97
74
|
|
|
98
75
|
## [4.4.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.4...@aws-amplify/storage@4.4.5) (2021-10-28)
|
|
99
76
|
|
|
100
|
-
|
|
101
77
|
### Bug Fixes
|
|
102
78
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
79
|
+
- **@aws-amplify/storage:** update axios http handler error handling ([#9125](https://github.com/aws-amplify/amplify-js/issues/9125)) ([55a78d6](https://github.com/aws-amplify/amplify-js/commit/55a78d6471306143eebbd855c246af225e8d90d8))
|
|
108
80
|
|
|
109
81
|
## [4.4.4](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.3...@aws-amplify/storage@4.4.4) (2021-10-21)
|
|
110
82
|
|
|
@@ -51055,6 +51055,10 @@ function isBlob(body) {
|
|
|
51055
51055
|
return typeof Blob !== 'undefined' && body instanceof Blob;
|
|
51056
51056
|
}
|
|
51057
51057
|
|
|
51058
|
+
function hasErrorResponse(error) {
|
|
51059
|
+
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';
|
|
51060
|
+
}
|
|
51061
|
+
|
|
51058
51062
|
var normalizeHeaders = function normalizeHeaders(headers, normalizedName) {
|
|
51059
51063
|
var e_1, _a;
|
|
51060
51064
|
|
|
@@ -51198,16 +51202,20 @@ function () {
|
|
|
51198
51202
|
})
|
|
51199
51203
|
};
|
|
51200
51204
|
})["catch"](function (error) {
|
|
51201
|
-
var _a, _b
|
|
51205
|
+
var _a, _b; // Error
|
|
51202
51206
|
|
|
51203
51207
|
|
|
51204
51208
|
if (error.message !== _common_StorageErrorStrings__WEBPACK_IMPORTED_MODULE_4__["AWSS3ProviderUploadErrorStrings"].UPLOAD_PAUSED_MESSAGE) {
|
|
51205
51209
|
logger.error(error.message);
|
|
51206
51210
|
} // for axios' cancel error, we should re-throw it back so it's not considered an s3client error
|
|
51207
|
-
// if we return empty, or an abitrary error HttpResponse, it will be hard to debug down the line
|
|
51211
|
+
// if we return empty, or an abitrary error HttpResponse, it will be hard to debug down the line.
|
|
51212
|
+
//
|
|
51213
|
+
// for errors that does not have a 'response' object, it's very likely that it is an unexpected error for
|
|
51214
|
+
// example a disconnect. Without it we cannot meaningfully reconstruct a HttpResponse, and the AWS SDK might
|
|
51215
|
+
// consider the request successful by mistake. In this case we should also re-throw the error.
|
|
51208
51216
|
|
|
51209
51217
|
|
|
51210
|
-
if (axios__WEBPACK_IMPORTED_MODULE_2___default.a.isCancel(error)) {
|
|
51218
|
+
if (axios__WEBPACK_IMPORTED_MODULE_2___default.a.isCancel(error) || !hasErrorResponse(error)) {
|
|
51211
51219
|
throw error;
|
|
51212
51220
|
} // otherwise, we should re-construct an HttpResponse from the error, so that it can be passed down to other
|
|
51213
51221
|
// aws sdk middleware (e.g retry, clock skew correction, error message serializing)
|
|
@@ -51215,9 +51223,9 @@ function () {
|
|
|
51215
51223
|
|
|
51216
51224
|
return {
|
|
51217
51225
|
response: new _aws_sdk_protocol_http__WEBPACK_IMPORTED_MODULE_0__["HttpResponse"]({
|
|
51218
|
-
statusCode:
|
|
51219
|
-
body: (
|
|
51220
|
-
headers: (
|
|
51226
|
+
statusCode: error.response.status,
|
|
51227
|
+
body: (_a = error.response) === null || _a === void 0 ? void 0 : _a.data,
|
|
51228
|
+
headers: (_b = error.response) === null || _b === void 0 ? void 0 : _b.headers
|
|
51221
51229
|
})
|
|
51222
51230
|
};
|
|
51223
51231
|
}), requestTimeout(requestTimeoutInMs)];
|