Skip to content

Commit

Permalink
enh: add a log for confluence report
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Fontanier committed Aug 10, 2024
1 parent 63a3880 commit f584dd5
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions connectors/src/connectors/confluence/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit f584dd5

Please sign in to comment.