@smithy/fetch-http-handler 5.3.13 → 5.3.15

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/dist-cjs/index.js CHANGED
@@ -161,7 +161,10 @@ function buildAbortError(abortSignal) {
161
161
  : undefined;
162
162
  if (reason) {
163
163
  if (reason instanceof Error) {
164
- return reason;
164
+ const abortError = new Error("Request aborted");
165
+ abortError.name = "AbortError";
166
+ abortError.cause = reason;
167
+ return abortError;
165
168
  }
166
169
  const abortError = new Error(String(reason));
167
170
  abortError.name = "AbortError";
@@ -143,7 +143,10 @@ function buildAbortError(abortSignal) {
143
143
  : undefined;
144
144
  if (reason) {
145
145
  if (reason instanceof Error) {
146
- return reason;
146
+ const abortError = new Error("Request aborted");
147
+ abortError.name = "AbortError";
148
+ abortError.cause = reason;
149
+ return abortError;
147
150
  }
148
151
  const abortError = new Error(String(reason));
149
152
  abortError.name = "AbortError";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.3.13",
3
+ "version": "5.3.15",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -28,14 +28,14 @@
28
28
  "module": "./dist-es/index.js",
29
29
  "types": "./dist-types/index.d.ts",
30
30
  "dependencies": {
31
- "@smithy/protocol-http": "^5.3.11",
32
- "@smithy/querystring-builder": "^4.2.11",
33
- "@smithy/types": "^4.13.0",
31
+ "@smithy/protocol-http": "^5.3.12",
32
+ "@smithy/querystring-builder": "^4.2.12",
33
+ "@smithy/types": "^4.13.1",
34
34
  "@smithy/util-base64": "^4.3.2",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@smithy/abort-controller": "^4.2.11",
38
+ "@smithy/abort-controller": "^4.2.12",
39
39
  "concurrently": "7.0.0",
40
40
  "downlevel-dts": "0.10.1",
41
41
  "premove": "4.0.0",