@arbidocs/sdk 0.3.50 → 0.3.52
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/{browser-BJdLTFSM.d.cts → browser-EUKWmZXZ.d.cts} +56 -20
- package/dist/{browser-BJdLTFSM.d.ts → browser-EUKWmZXZ.d.ts} +56 -20
- package/dist/browser.cjs +11 -1
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +11 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -5220,7 +5220,17 @@ async function retrieve(options) {
|
|
|
5220
5220
|
};
|
|
5221
5221
|
const { data, error } = await arbi.fetch.POST("/v1/assistant/retrieve", { body });
|
|
5222
5222
|
if (error) {
|
|
5223
|
-
|
|
5223
|
+
const detail = error?.detail;
|
|
5224
|
+
let message;
|
|
5225
|
+
if (typeof detail === "string") {
|
|
5226
|
+
message = detail;
|
|
5227
|
+
} else if (detail && typeof detail === "object") {
|
|
5228
|
+
const d2 = detail;
|
|
5229
|
+
message = typeof d2.hint === "string" && d2.hint || JSON.stringify(detail);
|
|
5230
|
+
} else {
|
|
5231
|
+
message = JSON.stringify(error);
|
|
5232
|
+
}
|
|
5233
|
+
throw new Error(`Retrieve failed: ${message}`);
|
|
5224
5234
|
}
|
|
5225
5235
|
return data;
|
|
5226
5236
|
}
|