@readyfor/api-client-base 0.250.0 → 0.250.1
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.
|
@@ -20,7 +20,8 @@ var createJsonFetcher = (schema, customRequestInit = {}) => (input, requestInit
|
|
|
20
20
|
mergeRequestInit(customRequestInit, requestInit)
|
|
21
21
|
)
|
|
22
22
|
).then(async (res) => {
|
|
23
|
-
const
|
|
23
|
+
const text = await res.text();
|
|
24
|
+
const body = text ? JSON.parse(text) : {};
|
|
24
25
|
if (res.ok) return body;
|
|
25
26
|
const code = Object.values(errorStatusCode).includes(res.status) ? res.status : 999;
|
|
26
27
|
const error = new HTTPError(code, body);
|
package/dist/fetcher.js
CHANGED
|
@@ -37,7 +37,8 @@ const createJsonFetcher = (schema, customRequestInit = {}) => (input, requestIni
|
|
|
37
37
|
(0, import_requestInit.mergeRequestInit)(customRequestInit, requestInit)
|
|
38
38
|
)
|
|
39
39
|
).then(async (res) => {
|
|
40
|
-
const
|
|
40
|
+
const text = await res.text();
|
|
41
|
+
const body = text ? JSON.parse(text) : {};
|
|
41
42
|
if (res.ok) return body;
|
|
42
43
|
const code = Object.values(import_apiError.errorStatusCode).includes(res.status) ? res.status : 999;
|
|
43
44
|
const error = new import_apiError.HTTPError(code, body);
|
package/dist/fetcher.mjs
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readyfor/api-client-base",
|
|
3
|
-
"version": "0.250.
|
|
3
|
+
"version": "0.250.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"!src/**/*.test.tsx"
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "31493c537a9c6435c68168f9fd7d908105127f89"
|
|
79
79
|
}
|