@skilder-ai/runtime 0.9.6 → 0.9.8
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.js +14 -2
- package/dist/index.js.map +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -87950,7 +87950,13 @@ async function executeGraphQL(query, variables, userKey, logger) {
|
|
|
87950
87950
|
});
|
|
87951
87951
|
if (!response.ok) {
|
|
87952
87952
|
const hint = getHttpErrorHint(response.status);
|
|
87953
|
-
|
|
87953
|
+
let detail = "";
|
|
87954
|
+
try {
|
|
87955
|
+
const text2 = await response.text();
|
|
87956
|
+
if (text2) detail = `. Response: ${text2.length > 500 ? text2.slice(0, 500) + "\u2026" : text2}`;
|
|
87957
|
+
} catch {
|
|
87958
|
+
}
|
|
87959
|
+
throw new Error(`HTTP error: ${response.status} ${response.statusText}${hint}${detail}`);
|
|
87954
87960
|
}
|
|
87955
87961
|
const result = await response.json();
|
|
87956
87962
|
if (result.errors && result.errors.length > 0) {
|
|
@@ -111000,7 +111006,6 @@ var NatsMessage = class {
|
|
|
111000
111006
|
}
|
|
111001
111007
|
return message;
|
|
111002
111008
|
}
|
|
111003
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
111004
111009
|
validate(_data) {
|
|
111005
111010
|
throw new Error("validate method not implemented.");
|
|
111006
111011
|
}
|
|
@@ -145848,6 +145853,13 @@ To execute this script:
|
|
|
145848
145853
|
}
|
|
145849
145854
|
if (!response.ok) {
|
|
145850
145855
|
if (response.status === 404) {
|
|
145856
|
+
const parsed = await response.clone().json().catch(() => null);
|
|
145857
|
+
if (parsed?.code === "ASSET_NO_FILE_ATTACHED") {
|
|
145858
|
+
throw new DownloadAssetError(
|
|
145859
|
+
`Error: Asset "${item.name}" has no file attached yet. Ask the user to upload one in the Skilder editor before retrying.`,
|
|
145860
|
+
skill.id
|
|
145861
|
+
);
|
|
145862
|
+
}
|
|
145851
145863
|
throw new DownloadAssetError(
|
|
145852
145864
|
`Error: Asset "${item.name}" has not been uploaded yet, or no longer exists.`,
|
|
145853
145865
|
skill.id
|