diff --git a/connectors/src/connectors/confluence/temporal/activities.ts b/connectors/src/connectors/confluence/temporal/activities.ts index b86081f3fdf2..50be2df6cf06 100644 --- a/connectors/src/connectors/confluence/temporal/activities.ts +++ b/connectors/src/connectors/confluence/temporal/activities.ts @@ -614,7 +614,7 @@ export async function confluenceGetReportPersonalActionActivity( const { connectorId, userAccountId } = params; const connector = await fetchConfluenceConnector(connectorId); - if (connector.errorType === "oauth_token_revoked") { + if (connector.hasExternalAuthError()) { return false; } diff --git a/connectors/src/resources/connector_resource.ts b/connectors/src/resources/connector_resource.ts index c1cf2ae61ae8..1b59fd66ef20 100644 --- a/connectors/src/resources/connector_resource.ts +++ b/connectors/src/resources/connector_resource.ts @@ -152,4 +152,8 @@ export class ConnectorResource extends BaseResource { async markAsPaused() { return this.update({ pausedAt: new Date() }); } + + hasExternalAuthError() { + return this.errorType === "oauth_token_revoked"; + } }