From f2cf8942348637ec0ea02fddaa0319a2996cae2a Mon Sep 17 00:00:00 2001 From: Flavien David Date: Mon, 22 Jul 2024 14:44:25 +0200 Subject: [PATCH] Fix Confluence typo + OAuth http status code (#6400) * Fix Confluence typo * :see_no_evil: --- connectors/src/connectors/confluence/temporal/activities.ts | 2 +- core/bin/oauth.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/connectors/src/connectors/confluence/temporal/activities.ts b/connectors/src/connectors/confluence/temporal/activities.ts index f6c20480fca3..376369518834 100644 --- a/connectors/src/connectors/confluence/temporal/activities.ts +++ b/connectors/src/connectors/confluence/temporal/activities.ts @@ -66,7 +66,7 @@ async function getConfluenceAccessTokenWithThrow(connectionId: string) { if (isDualUseOAuthConnectionId(connectionId)) { const token = await getOAuthConnectionAccessTokenWithThrow({ logger, - provider: "intercom", + provider: "confluence", connectionId, }); diff --git a/core/bin/oauth.rs b/core/bin/oauth.rs index 3d331c55d28d..6ecd053da7a1 100644 --- a/core/bin/oauth.rs +++ b/core/bin/oauth.rs @@ -118,6 +118,7 @@ async fn connections_finalize( { Err(e) => error_response( match e.code { + connection::ConnectionErrorCode::TokenRevokedError => StatusCode::UNAUTHORIZED, connection::ConnectionErrorCode::ConnectionAlreadyFinalizedError => { StatusCode::BAD_REQUEST } @@ -170,6 +171,7 @@ async fn connections_access_token( Ok(mut c) => match c.access_token(state.clone().store.clone()).await { Err(e) => error_response( match e.code { + connection::ConnectionErrorCode::TokenRevokedError => StatusCode::UNAUTHORIZED, connection::ConnectionErrorCode::ConnectionNotFinalizedError => { StatusCode::BAD_REQUEST }