Skip to content

Commit

Permalink
Fix Confluence typo + OAuth http status code (#6400)
Browse files Browse the repository at this point in the history
* Fix Confluence typo

* 🙈
  • Loading branch information
flvndvd authored Jul 22, 2024
1 parent 0fd45e6 commit f2cf894
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function getConfluenceAccessTokenWithThrow(connectionId: string) {
if (isDualUseOAuthConnectionId(connectionId)) {
const token = await getOAuthConnectionAccessTokenWithThrow({
logger,
provider: "intercom",
provider: "confluence",
connectionId,
});

Expand Down
2 changes: 2 additions & 0 deletions core/bin/oauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit f2cf894

Please sign in to comment.