reykit 1.0.63 → 1.0.64

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/index.js CHANGED
@@ -27655,7 +27655,7 @@ async function NE(Z, {
27655
27655
  );
27656
27656
  if (qt && !L.ok) {
27657
27657
  const Kt = await L.text();
27658
- throw new Error(Kt);
27658
+ throw new Error(Kt, { cause: L });
27659
27659
  }
27660
27660
  return L;
27661
27661
  }
package/dist/net.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
  * @param option.method - Request method.
21
21
  * - `undefined` : Automatic judge. When parameter `data` not has value, then is `get`, otherwise is `post`.
22
22
  * @param option.check - Whether to throw an error if the response is not in the 200–299 range.
23
+ * Note: `Error.message` is response body string, `Error.cause` is `Response` instance.
23
24
  * - `undefined` : False.
24
25
  */
25
26
  export declare function request(url: string, { params, body, headers, method, check, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [