Skip to content

Commit

Permalink
Slack: Add logs to understand why some Slack thread in datasource doc…
Browse files Browse the repository at this point in the history
…uemtnts have no sourceUrl (#4545)
  • Loading branch information
PopDaph authored Apr 3, 2024
1 parent fa8b020 commit c6c6cb6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions connectors/src/connectors/slack/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,17 @@ export async function syncNonThreaded(
});
if (linkRes.ok && linkRes.permalink) {
sourceUrl = linkRes.permalink;
} else {
logger.error(
{
connectorId,
channelId,
channelName,
messageTs: firstMessage.ts,
linkRes,
},
"No documentUrl for Slack non threaded: Failed to get permalink"
);
}
}
const lastMessage = messages.at(-1);
Expand Down Expand Up @@ -593,6 +604,18 @@ export async function syncThread(
});
if (linkRes.ok && linkRes.permalink) {
sourceUrl = linkRes.permalink;
} else {
logger.error(
{
connectorId,
channelId,
channelName,
threadTs,
messageTs: firstMessage.ts,
linkRes,
},
"No documentUrl for Slack thread: Failed to get permalink"
);
}
}
const lastMessage = allMessages.at(-1);
Expand Down

0 comments on commit c6c6cb6

Please sign in to comment.