@skydiveai/pi-extensions 0.1.0-beta.993 → 0.1.0-beta.994
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/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1829,7 +1829,14 @@ async function postSubagentSpawn({ messageId, tasks }) {
|
|
|
1829
1829
|
messageId,
|
|
1830
1830
|
tasks
|
|
1831
1831
|
} });
|
|
1832
|
-
if (!res.ok)
|
|
1832
|
+
if (!res.ok) {
|
|
1833
|
+
let detail = "";
|
|
1834
|
+
try {
|
|
1835
|
+
const errBody = await res.json();
|
|
1836
|
+
if (errBody && typeof errBody.error === "string") detail = `: ${errBody.error}`;
|
|
1837
|
+
} catch {}
|
|
1838
|
+
throw new Error(`subagent-spawn POST failed (${res.status})${detail}`);
|
|
1839
|
+
}
|
|
1833
1840
|
const body = await res.json();
|
|
1834
1841
|
return {
|
|
1835
1842
|
taskIds: body.taskIds,
|