Skip to content

Commit

Permalink
feat(export): ajout de contexte sur l'erreur quand on récupère les do…
Browse files Browse the repository at this point in the history
…cs (#1347)
  • Loading branch information
m-maillot authored Apr 2, 2024
1 parent cef0ceb commit 45a81c0
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
}
Expand Down

0 comments on commit 45a81c0

Please sign in to comment.