From f584dd51f282f92f8fcc4948df605ab1ff3bc7fa Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Sat, 10 Aug 2024 11:27:45 +0200 Subject: [PATCH] enh: add a log for confluence report --- .../confluence/temporal/activities.ts | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/connectors/src/connectors/confluence/temporal/activities.ts b/connectors/src/connectors/confluence/temporal/activities.ts index fca2fc224062..401a05fb2833 100644 --- a/connectors/src/connectors/confluence/temporal/activities.ts +++ b/connectors/src/connectors/confluence/temporal/activities.ts @@ -659,19 +659,26 @@ export async function confluenceGetReportPersonalActionActivity( }); if (oldestPageSync) { - const client = await getConfluenceClient({}, connector); + try { + const client = await getConfluenceClient({}, connector); - const result = await client.reportAccount({ - accountId: userAccountId, - updatedAt: oldestPageSync.lastVisitedAt, - }); + const result = await client.reportAccount({ + accountId: userAccountId, + updatedAt: oldestPageSync.lastVisitedAt, + }); - if (result && result.status === "closed") { - logger.info( - { connectorId, userAccountId }, - "Confluence report accounts API, account closed." + if (result && result.status === "closed") { + logger.info( + { connectorId, userAccountId }, + "Confluence report accounts API, account closed." + ); + return true; + } + } catch (err) { + logger.error( + { connectorId, userAccountId, err }, + "Error while reporting Confluence account." ); - return true; } }