Skip to content

Commit a2367b1

Browse files
ivicacigorbeslic
authored andcommitted
3306 Update GoogleConnection to refine token refresh handling logic
1 parent 56005cd commit a2367b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • server/libs/modules/components/google/google-commons/src/main/java/com/bytechef/google/commons

server/libs/modules/components/google/google-commons/src/main/java/com/bytechef/google/commons/GoogleConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static ModifiableConnectionDefinition createConnection(Authorization.Scop
4949
.oAuth2AuthorizationExtraQueryParameters(
5050
Map.of("access_type", "offline", "prompt", "select_account consent"))
5151
.refreshUrl((connectionParameters, context) -> GoogleOAuthConstants.TOKEN_SERVER_URL)
52-
.refreshOn("^.*(4\\d\\d)(\\s(Unauthorized)?.*)?$")
52+
.refreshOn(401, "^.*(4\\d\\d)(\\s(Unauthorized)?.*)?$")
5353
.scopes(scopes)
5454
.tokenUrl((connection, context) -> GoogleOAuthConstants.TOKEN_SERVER_URL));
5555
}

0 commit comments

Comments
 (0)