Skip to content

Commit e2e8936

Browse files
Update databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/AzureDevOpsIDTokenSource.java
Co-authored-by: Renaud Hartert <[email protected]>
1 parent daa4122 commit e2e8936

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/AzureDevOpsIDTokenSource.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,14 @@ public IDToken getIDToken(String audience) {
168168

169169
try {
170170
String tokenValue = jsonResp.get("oidcToken").textValue();
171-
if (Strings.isNullOrEmpty(tokenValue)) {
172-
throw new DatabricksException("Received empty OIDC token from Azure DevOps");
173-
}
174-
return new IDToken(tokenValue);
175171
} catch (IllegalArgumentException e) {
176172
throw new DatabricksException(
177173
"Received invalid OIDC token from Azure DevOps: " + e.getMessage(), e);
178174
}
175+
176+
if (Strings.isNullOrEmpty(tokenValue)) {
177+
throw new DatabricksException("Received empty OIDC token from Azure DevOps");
178+
}
179+
return new IDToken(tokenValue);
179180
}
180181
}

0 commit comments

Comments
 (0)