@overmap-ai/core 1.0.35-fix-token-refresh-loop.0 → 1.0.35-fix-token-refresh-loop.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.
|
@@ -3461,6 +3461,19 @@ var __publicField = (obj, key, value) => {
|
|
|
3461
3461
|
return errorRes.body.error;
|
|
3462
3462
|
if (typeof errorRes.body.message === "string")
|
|
3463
3463
|
return errorRes.body.message;
|
|
3464
|
+
try {
|
|
3465
|
+
return Object.entries(errorRes.body).map(([key, value]) => {
|
|
3466
|
+
if (typeof value === "string") {
|
|
3467
|
+
return `${key}: ${value}`;
|
|
3468
|
+
}
|
|
3469
|
+
if (Array.isArray(value)) {
|
|
3470
|
+
return value.map((v) => `${key}: ${v}`).join("\n");
|
|
3471
|
+
}
|
|
3472
|
+
return `${key}: ${JSON.stringify(value)}`;
|
|
3473
|
+
}).join("\n");
|
|
3474
|
+
} catch (e) {
|
|
3475
|
+
console.error("Failed to extract error message from response body", e);
|
|
3476
|
+
}
|
|
3464
3477
|
} else if (typeof errorRes.body === "string")
|
|
3465
3478
|
return errorRes.body;
|
|
3466
3479
|
} else if (errorRes == null ? void 0 : errorRes.text) {
|