@asgard-js/core 0.3.25 → 0.3.26
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.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/http-error.d.ts +8 -1
- package/dist/types/http-error.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export declare class HttpError extends Error {
|
|
2
2
|
readonly status: number;
|
|
3
3
|
readonly statusText: string;
|
|
4
|
+
/**
|
|
5
|
+
* The decoded error payload, when the response carried one.
|
|
6
|
+
*
|
|
7
|
+
* Consumers branch on this — `asgard-ai-data-insight-web` reads `reason_code` off it to raise its
|
|
8
|
+
* credit-limit dialog on a `429` — so **always pass it when constructing from a real response**,
|
|
9
|
+
* even though the parameter is optional.
|
|
10
|
+
*/
|
|
4
11
|
readonly body: unknown;
|
|
5
|
-
constructor(status: number, statusText: string, body
|
|
12
|
+
constructor(status: number, statusText: string, body?: unknown);
|
|
6
13
|
}
|
|
7
14
|
export declare function isHttpError(error: unknown): error is HttpError;
|
|
8
15
|
//# sourceMappingURL=http-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-error.d.ts","sourceRoot":"","sources":["../../src/types/http-error.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;IAClC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,IAAI,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"http-error.d.ts","sourceRoot":"","sources":["../../src/types/http-error.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;IAClC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC;;;;;;OAMG;IACH,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAKlB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAO/D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D"}
|