From f3402f7fd7dbaab70a0d8296de3fda5139ce965d Mon Sep 17 00:00:00 2001 From: Satvik Ramaprasad Date: Tue, 3 Sep 2024 10:29:07 +0530 Subject: [PATCH] Handle login.html incorrect validation for PL --- .../java/com/databricks/sdk/core/DatabricksConfig.java | 8 ++++++-- .../com/databricks/sdk/core/error/PrivateLinkInfo.java | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java index 41949e7c3..34fb10685 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java @@ -392,13 +392,17 @@ public DatabricksConfig setAzureUseMsi(boolean azureUseMsi) { return this; } - /** @deprecated Use {@link #getAzureUseMsi()} instead. */ + /** + * @deprecated Use {@link #getAzureUseMsi()} instead. + */ @Deprecated() public boolean getAzureUseMSI() { return azureUseMsi; } - /** @deprecated Use {@link #setAzureUseMsi(boolean)} instead. */ + /** + * @deprecated Use {@link #setAzureUseMsi(boolean)} instead. + */ @Deprecated public DatabricksConfig setAzureUseMSI(boolean azureUseMsi) { this.azureUseMsi = azureUseMsi; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/PrivateLinkInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/PrivateLinkInfo.java index 9ef75aa7f..6b11453ae 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/PrivateLinkInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/PrivateLinkInfo.java @@ -53,7 +53,8 @@ public String errorMessage() { public static boolean isPrivateLinkRedirect(Response resp) { return resp.getUrl().getPath().equals("/login.html") - && resp.getUrl().getQuery().contains("error=private-link-validation-error"); + && (resp.getUrl().getQuery() != null + && resp.getUrl().getQuery().contains("error=private-link-validation-error")); } static PrivateLinkValidationError createPrivateLinkValidationError(Response resp) {