@aws-amplify/storage 4.4.5-unstable.5 → 4.4.5
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 +11 -0
- package/dist/aws-amplify-storage.js +19 -3
- 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 +4 -3
- package/lib/providers/axios-http-handler.js +15 -1
- package/lib/providers/axios-http-handler.js.map +1 -1
- package/lib-esm/providers/axios-http-handler.d.ts +4 -3
- package/lib-esm/providers/axios-http-handler.js +15 -1
- package/lib-esm/providers/axios-http-handler.js.map +1 -1
- package/package.json +3 -3
- package/src/providers/axios-http-handler.ts +19 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.4...@aws-amplify/storage@4.4.5) (2021-10-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **@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))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
@@ -51145,12 +51145,28 @@ function () {
|
|
|
51145
51145
|
})
|
|
51146
51146
|
};
|
|
51147
51147
|
})["catch"](function (error) {
|
|
51148
|
-
// Error
|
|
51148
|
+
var _a, _b, _c; // Error
|
|
51149
|
+
|
|
51150
|
+
|
|
51149
51151
|
if (error.message !== _common_StorageErrorStrings__WEBPACK_IMPORTED_MODULE_4__["AWSS3ProviderUploadErrorStrings"].UPLOAD_PAUSED_MESSAGE) {
|
|
51150
51152
|
logger.error(error.message);
|
|
51151
|
-
}
|
|
51153
|
+
} // for axios' cancel error, we should re-throw it back so it's not considered an s3client error
|
|
51154
|
+
// if we return empty, or an abitrary error HttpResponse, it will be hard to debug down the line
|
|
51152
51155
|
|
|
51153
|
-
|
|
51156
|
+
|
|
51157
|
+
if (axios__WEBPACK_IMPORTED_MODULE_2___default.a.isCancel(error)) {
|
|
51158
|
+
throw error;
|
|
51159
|
+
} // otherwise, we should re-construct an HttpResponse from the error, so that it can be passed down to other
|
|
51160
|
+
// aws sdk middleware (e.g retry, clock skew correction, error message serializing)
|
|
51161
|
+
|
|
51162
|
+
|
|
51163
|
+
return {
|
|
51164
|
+
response: new _aws_sdk_protocol_http__WEBPACK_IMPORTED_MODULE_0__["HttpResponse"]({
|
|
51165
|
+
statusCode: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
|
|
51166
|
+
body: (_b = error.response) === null || _b === void 0 ? void 0 : _b.data,
|
|
51167
|
+
headers: (_c = error.response) === null || _c === void 0 ? void 0 : _c.headers
|
|
51168
|
+
})
|
|
51169
|
+
};
|
|
51154
51170
|
}), requestTimeout(requestTimeoutInMs)];
|
|
51155
51171
|
return Promise.race(raceOfPromises);
|
|
51156
51172
|
};
|