@hey-api/openapi-ts 0.78.1 → 0.78.3
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/{chunk-4AJU36PO.js → chunk-YJGQGZQU.js} +11 -11
- package/dist/chunk-YJGQGZQU.js.map +1 -0
- package/dist/clients/fetch/client.ts +4 -2
- package/dist/clients/next/client.ts +4 -2
- package/dist/index.cjs +54 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +345 -4
- package/dist/index.d.ts +345 -4
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +8 -8
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-DtZlpeRE.d.cts → types.d-CaH9PF-K.d.cts} +40 -8
- package/dist/{types.d-DtZlpeRE.d.ts → types.d-CaH9PF-K.d.ts} +40 -8
- package/package.json +1 -1
- package/dist/chunk-4AJU36PO.js.map +0 -1
|
@@ -143,14 +143,16 @@ export const createClient = (config: Config = {}): Client => {
|
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
const textError = await response.text();
|
|
147
|
+
let jsonError: unknown;
|
|
147
148
|
|
|
148
149
|
try {
|
|
149
|
-
|
|
150
|
+
jsonError = JSON.parse(textError);
|
|
150
151
|
} catch {
|
|
151
152
|
// noop
|
|
152
153
|
}
|
|
153
154
|
|
|
155
|
+
const error = jsonError ?? textError;
|
|
154
156
|
let finalError = error;
|
|
155
157
|
|
|
156
158
|
for (const fn of interceptors.error._fns) {
|
|
@@ -128,14 +128,16 @@ export const createClient = (config: Config = {}): Client => {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
const textError = await response.text();
|
|
132
|
+
let jsonError: unknown;
|
|
132
133
|
|
|
133
134
|
try {
|
|
134
|
-
|
|
135
|
+
jsonError = JSON.parse(textError);
|
|
135
136
|
} catch {
|
|
136
137
|
// noop
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
const error = jsonError ?? textError;
|
|
139
141
|
let finalError = error;
|
|
140
142
|
|
|
141
143
|
for (const fn of interceptors.error._fns) {
|