From ff50c3103befd01a33b7fbaedac5c1fa12ac3b89 Mon Sep 17 00:00:00 2001 From: Nicolas Thouvenin Date: Thu, 7 Nov 2024 10:20:20 +0100 Subject: [PATCH 1/2] print error in preview lines --- src/api/services/enrichment/enrichment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/services/enrichment/enrichment.js b/src/api/services/enrichment/enrichment.js index cb788a662..52e752917 100644 --- a/src/api/services/enrichment/enrichment.js +++ b/src/api/services/enrichment/enrichment.js @@ -216,7 +216,7 @@ const processEzsEnrichment = (entries, commands, ctx, preview = false) => { } return values.push({ id: sourceChunk?.id, - error: error?.sourceError?.message, + value: error?.sourceError?.message, }); } else { return values.push(data); From f835215a0700ddcd024f815e72dc9f0f85c64c0b Mon Sep 17 00:00:00 2001 From: Nicolas Thouvenin Date: Thu, 7 Nov 2024 11:15:14 +0100 Subject: [PATCH 2/2] message for each line --- package-lock.json | 68 +++++++++++------------ package.json | 16 +++--- src/api/services/enrichment/enrichment.js | 4 +- 3 files changed, 42 insertions(+), 46 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8ced05f4..1fcddbb9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,16 +28,16 @@ "@draconides/format": "1.0.3", "@emotion/react": "11.7.1", "@emotion/styled": "11.6.0", - "@ezs/analytics": "2.3.2", - "@ezs/basics": "2.7.2", - "@ezs/conditor": "2.12.2", - "@ezs/core": "3.10.4", - "@ezs/istex": "1.5.9", + "@ezs/analytics": "2.3.3", + "@ezs/basics": "2.8.0", + "@ezs/conditor": "2.12.3", + "@ezs/core": "3.10.6", + "@ezs/istex": "1.5.10", "@ezs/lodex": "file:./packages/ezsLodex", - "@ezs/sparql": "1.2.3", - "@ezs/storage": "3.2.3", + "@ezs/sparql": "1.2.4", + "@ezs/storage": "3.2.4", "@ezs/transformers": "file:./packages/transformers", - "@ezs/xslt": "1.3.31", + "@ezs/xslt": "1.3.32", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/react-fontawesome": "^0.1.18", @@ -3095,9 +3095,9 @@ } }, "node_modules/@ezs/analytics": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@ezs/analytics/-/analytics-2.3.2.tgz", - "integrity": "sha512-Zh8UsazFa9y66S5hBMtuCMZ2M9m+g9wQVaUyjRiCwwKedQEGgBOYe+uyEhf1yCydbLBUWGvnVFsrE1I/504O4w==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@ezs/analytics/-/analytics-2.3.3.tgz", + "integrity": "sha512-jYpzt1ocTTJrnPWFm5hIb4nfGwTjOxQOtA5k4rxYua7LMugBzYFTKEPckWPAHp4meORbFvCehVxdFU7oVpsX7A==", "dependencies": { "@ezs/store": "2.0.4", "async-each-series": "1.1.0", @@ -3140,9 +3140,9 @@ } }, "node_modules/@ezs/basics": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@ezs/basics/-/basics-2.7.2.tgz", - "integrity": "sha512-eJcaWgQuWzg5VTuFngLOG56X97ZWwAiFS/2+K39reuN3w9WF9pycK36M6R0Ehmm4H7I7ZyCblrDZ84Dr4EtdRA==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@ezs/basics/-/basics-2.8.0.tgz", + "integrity": "sha512-NITn7A99YF16WnxuZP6khq8pGeDnpNUE3lUxEtSxyBHB4fWM9XGlabnY7F9Wnkz/4yjNMU3XeGrno+Q4H5J2HQ==", "dependencies": { "async-retry": "1.3.3", "better-https-proxy-agent": "1.0.9", @@ -3154,7 +3154,6 @@ "from": "0.1.7", "get-stream": "6.0.1", "higher-path": "1.0.0", - "inflection": "2.0.1", "JSONStream": "1.3.5", "lodash": "4.17.21", "make-dir": "4.0.0", @@ -3313,9 +3312,9 @@ "license": "ISC" }, "node_modules/@ezs/conditor": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/@ezs/conditor/-/conditor-2.12.2.tgz", - "integrity": "sha512-F0dCIG4SpxwyEdfamcypDpSWN3e3/jQNaI/Q7SN+O7yutw1eIP4eEhl2dJh5xGWD2DOrnwvMUWTg8KK1NSeXWQ==", + "version": "2.12.3", + "resolved": "https://registry.npmjs.org/@ezs/conditor/-/conditor-2.12.3.tgz", + "integrity": "sha512-tugLgewYZlUazZR0Ef5vkQoqNBGEipvyZKfA2WZ/i7tTLMtQBy81XJlUQpcqNRaJMx6XIZleclOwU8HI/pzFYA==", "dependencies": { "async-each-series": "^1.1.0", "async-retry": "1.3.3", @@ -3441,9 +3440,9 @@ } }, "node_modules/@ezs/core": { - "version": "3.10.4", - "resolved": "https://registry.npmjs.org/@ezs/core/-/core-3.10.4.tgz", - "integrity": "sha512-Xf6bGDTSE1xd2NHmN/OTQVzWml3DWqr0oatvca4NyzzKMxdUdTsIRnppvft67KAacPQYxzLxQHrsSDTRpKK2vQ==", + "version": "3.10.6", + "resolved": "https://registry.npmjs.org/@ezs/core/-/core-3.10.6.tgz", + "integrity": "sha512-kqS7X93Sf2MlpGDEuyb8/YsMYidEZhDw+MoHtS8Jq5d4tKOiYMKw4mZkNXeMCZ6Ne1pXWy3m5iFXxvTAYMZYmQ==", "dependencies": { "app-module-path": "2.2.0", "autocast": "0.0.4", @@ -3642,8 +3641,9 @@ "license": "ISC" }, "node_modules/@ezs/istex": { - "version": "1.5.9", - "license": "MIT", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@ezs/istex/-/istex-1.5.10.tgz", + "integrity": "sha512-aO1L541l9KCtv0K0wq6b8Xu6LYN1IkHOMLDF1QjiqkXvbGCbM34uW3pij0hjozJqrLq4TrFwKor2ttZIT/k7hw==", "dependencies": { "@istex/istex-exchange": "1.2.1", "archiver": "3.1.1", @@ -3747,8 +3747,9 @@ "link": true }, "node_modules/@ezs/sparql": { - "version": "1.2.3", - "license": "MIT", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@ezs/sparql/-/sparql-1.2.4.tgz", + "integrity": "sha512-Tm7K19BcZpZN9sR6O4XRW0VWmoXzbdjyNNhe1ASu07CPX46FS8J+myXAXsVFg1DgsrovJcSwMYlHjO90kHXmwg==", "dependencies": { "fetch-with-proxy": "3.0.1", "isomorphic-fetch": "2.2.1" @@ -3799,8 +3800,9 @@ } }, "node_modules/@ezs/storage": { - "version": "3.2.3", - "license": "MIT", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@ezs/storage/-/storage-3.2.4.tgz", + "integrity": "sha512-v+Q3Z3bITzvpyjYD6HOp+HyyVl6E2UJMSFv54XI61GzcyYiYUeHBxVcMFEZnXj3q2hE1D8tZc467DPssmxnfcg==", "dependencies": { "cacache": "^17.1.3", "lodash": "4.17.21", @@ -3888,8 +3890,9 @@ "link": true }, "node_modules/@ezs/xslt": { - "version": "1.3.31", - "license": "MIT", + "version": "1.3.32", + "resolved": "https://registry.npmjs.org/@ezs/xslt/-/xslt-1.3.32.tgz", + "integrity": "sha512-ztPS/vEM91LRlmKbtCDzMGbpsPsei7/4U5Rk319LhiYp7s4tEX02hTJBPo2qcRJhKn70WSx55vFoaHqZER7XUA==", "peerDependencies": { "@ezs/core": "*" } @@ -17860,13 +17863,6 @@ "node": ">= 0.8.0" } }, - "node_modules/inflection": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/inflight": { "version": "1.0.6", "license": "ISC", diff --git a/package.json b/package.json index dcfc3418b..4fa7e7530 100644 --- a/package.json +++ b/package.json @@ -74,16 +74,16 @@ "@draconides/format": "1.0.3", "@emotion/react": "11.7.1", "@emotion/styled": "11.6.0", - "@ezs/analytics": "2.3.2", - "@ezs/basics": "2.7.2", - "@ezs/conditor": "2.12.2", - "@ezs/core": "3.10.4", - "@ezs/istex": "1.5.9", + "@ezs/analytics": "2.3.3", + "@ezs/basics": "2.8.0", + "@ezs/conditor": "2.12.3", + "@ezs/core": "3.10.6", + "@ezs/istex": "1.5.10", "@ezs/lodex": "file:./packages/ezsLodex", - "@ezs/sparql": "1.2.3", - "@ezs/storage": "3.2.3", + "@ezs/sparql": "1.2.4", + "@ezs/storage": "3.2.4", "@ezs/transformers": "file:./packages/transformers", - "@ezs/xslt": "1.3.31", + "@ezs/xslt": "1.3.32", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/react-fontawesome": "^0.1.18", diff --git a/src/api/services/enrichment/enrichment.js b/src/api/services/enrichment/enrichment.js index 52e752917..88323b4b3 100644 --- a/src/api/services/enrichment/enrichment.js +++ b/src/api/services/enrichment/enrichment.js @@ -112,7 +112,7 @@ export const getEnrichmentDataPreview = async (ctx) => { } catch (error) { const logger = getLogger(ctx.tenant); logger.error(`Error while processing enrichment preview`, error); - return []; + return [`Execution Error: ${error?.sourceError?.message}` ]; } return result; }; @@ -216,7 +216,7 @@ const processEzsEnrichment = (entries, commands, ctx, preview = false) => { } return values.push({ id: sourceChunk?.id, - value: error?.sourceError?.message, + value: error?.message, }); } else { return values.push(data);