simple-strapi 1.0.0-alpha.14 → 1.0.0-alpha.15
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/client.js +4 -1
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -354,12 +354,15 @@ class Client {
|
|
|
354
354
|
},
|
|
355
355
|
});
|
|
356
356
|
if (!response.ok) {
|
|
357
|
+
// --- AGGIUNGI QUESTO BLOCCO PER IL DEBUG ---
|
|
358
|
+
const errorBody = await response.json().catch(() => ({}));
|
|
357
359
|
throw createSimpleException({
|
|
358
360
|
code: response.status,
|
|
359
|
-
message: response.statusText,
|
|
361
|
+
message: errorBody.error?.message || response.statusText,
|
|
360
362
|
type: "error",
|
|
361
363
|
source: "strapi-utils/client.ts",
|
|
362
364
|
});
|
|
365
|
+
// --------------------------------------------
|
|
363
366
|
}
|
|
364
367
|
const { data, meta } = z
|
|
365
368
|
.object({ data: z.any(), meta: z.any() })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-strapi",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"node-fetch": "^3.3.2",
|
|
45
45
|
"qs": "^6.14.0",
|
|
46
|
-
"simple-exception": "
|
|
46
|
+
"simple-exception": "github:hund-studio/simple-exception",
|
|
47
47
|
"zod": "^4.0.5"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|