@qaecy/cue-cli 0.0.40 → 0.0.41
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/main.js +14 -3
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -8099,7 +8099,16 @@ WHERE {
|
|
|
8099
8099
|
qcy:dateCreated ?created ;
|
|
8100
8100
|
qcy:filePath ?fp .
|
|
8101
8101
|
}`;
|
|
8102
|
-
|
|
8102
|
+
let res;
|
|
8103
|
+
try {
|
|
8104
|
+
res = await graph.query(q, "application/sparql-results+json");
|
|
8105
|
+
} catch (err) {
|
|
8106
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
8107
|
+
if (msg.includes("HTTP 500")) {
|
|
8108
|
+
throw new Error("GRAPH_UNAVAILABLE: The knowledge graph for this project has no database configured. Contact your administrator or check the project setup.");
|
|
8109
|
+
}
|
|
8110
|
+
throw err;
|
|
8111
|
+
}
|
|
8103
8112
|
const map = {};
|
|
8104
8113
|
if (typeof res === "string")
|
|
8105
8114
|
return map;
|
|
@@ -9298,7 +9307,7 @@ async function syncHandler(options) {
|
|
|
9298
9307
|
}
|
|
9299
9308
|
if (preview.creditsToConsume > preview.creditsAvailable) {
|
|
9300
9309
|
console.error(
|
|
9301
|
-
`Insufficient credits: ${Math.round(preview.creditsToConsume)} required, ${Math.round(preview.creditsAvailable)} available.`
|
|
9310
|
+
`Insufficient credits: ${Math.round(preview.creditsToConsume)} required, ${Math.round(preview.creditsAvailable)} available. Contact the QAECY sales team at mail@qaecy.com to top up credits.`
|
|
9302
9311
|
);
|
|
9303
9312
|
process.exit(1);
|
|
9304
9313
|
}
|
|
@@ -9338,7 +9347,9 @@ async function syncHandler(options) {
|
|
|
9338
9347
|
process.exit(0);
|
|
9339
9348
|
} catch (err) {
|
|
9340
9349
|
const msg = err instanceof Error ? err.message : String(err);
|
|
9341
|
-
if (msg.includes("
|
|
9350
|
+
if (msg.includes("GRAPH_UNAVAILABLE")) {
|
|
9351
|
+
console.error("The knowledge graph for this project has no database configured. Contact your administrator or check the project setup.");
|
|
9352
|
+
} else if (msg.includes("GRAPH_TIMEOUT")) {
|
|
9342
9353
|
console.error("Could not reach the knowledge graph. Make sure all required services are running.");
|
|
9343
9354
|
} else if (msg.includes("METADATA_SYNC_FAILED")) {
|
|
9344
9355
|
console.error("Metadata sync failed. Try again.");
|