@scalar/api-client 0.7.34 → 0.7.35

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
@@ -1,5 +1,12 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 0.7.35
4
+
5
+ ### Patch Changes
6
+
7
+ - fdaabfe: fix: surface proxy internal service errors
8
+ - fdaabfe: fix: catch axios errors and show them in the response
9
+
3
10
  ## 0.7.34
4
11
 
5
12
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/helpers/sendRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAUjB;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAiI/B"}
1
+ {"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/helpers/sendRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAUjB;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAsI/B"}
package/dist/index.js CHANGED
@@ -26535,9 +26535,12 @@ async function sendRequest(request, proxyUrl) {
26535
26535
  }).catch((error) => {
26536
26536
  const { response: errorResponse } = error;
26537
26537
  return {
26538
+ headers: {
26539
+ "content-type": "application/json"
26540
+ },
26538
26541
  ...errorResponse,
26539
- statusCode: errorResponse.status,
26540
- data: JSON.stringify(errorResponse.data)
26542
+ statusCode: (errorResponse == null ? void 0 : errorResponse.status) ?? 0,
26543
+ data: JSON.stringify((errorResponse == null ? void 0 : errorResponse.data) ?? { error: error.code })
26541
26544
  };
26542
26545
  });
26543
26546
  return {
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "rest",
14
14
  "testing"
15
15
  ],
16
- "version": "0.7.34",
16
+ "version": "0.7.35",
17
17
  "engines": {
18
18
  "node": ">=20"
19
19
  },
@@ -58,7 +58,7 @@
58
58
  "vite-plugin-css-injected-by-js": "^3.3.0",
59
59
  "vitest": "^0.34.4",
60
60
  "vue-tsc": "^1.8.19",
61
- "@scalar/api-client-proxy": "0.5.10",
61
+ "@scalar/api-client-proxy": "0.5.11",
62
62
  "@scalar/echo-server": "0.5.5"
63
63
  },
64
64
  "peerDependencies": {