From 45a81c045d4147c3fab979ace03aa73e14398e04 Mon Sep 17 00:00:00 2001 From: Martial Maillot Date: Tue, 2 Apr 2024 16:30:51 +0200 Subject: [PATCH] =?UTF-8?q?feat(export):=20ajout=20de=20contexte=20sur=20l?= =?UTF-8?q?'erreur=20quand=20on=20r=C3=A9cup=C3=A8re=20les=20docs=20(#1347?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ingester/common/fetchCdtnAdminDocuments.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/targets/export-elasticsearch/src/ingester/common/fetchCdtnAdminDocuments.ts b/targets/export-elasticsearch/src/ingester/common/fetchCdtnAdminDocuments.ts index a288df008..5ac32f320 100644 --- a/targets/export-elasticsearch/src/ingester/common/fetchCdtnAdminDocuments.ts +++ b/targets/export-elasticsearch/src/ingester/common/fetchCdtnAdminDocuments.ts @@ -171,6 +171,13 @@ const createDocumentsFetcher = { source: string } >(graphQLAgreggateDocumentBySource, { source }) .toPromise(); + if (nbDocResult.error) { + throw new Error( + `Failed to count ${source} documents -> ${JSON.stringify( + nbDocResult.error + )}` + ); + } if (!nbDocResult.data) { return []; }