Skip to content

Commit

Permalink
Add curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
tatu-at-datastax committed May 22, 2024
1 parent b979140 commit 5546b21
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,16 @@ private void validateAuthentication(
throw ErrorCode.VECTORIZE_INVALID_SHARED_KEY_VALUE_FORMAT.toApiException(
"providerKey value should be formatted as '[keyName].providerKey'");
}

String providerKeyString = sharedKeyValue.substring(dotIndex + 1);
if (!"providerKey".equals(providerKeyString)) {
throw ErrorCode.VECTORIZE_INVALID_SHARED_KEY_VALUE_FORMAT.toApiException(
"providerKey value should be formatted as '[keyName].providerKey'");
}
}
if (operationsConfig.enableEmbeddingGateway())
if (operationsConfig.enableEmbeddingGateway()) {
validateCredentials.validate(userConfig.provider(), userAuth.getValue());
}
}
}
}
Expand Down

0 comments on commit 5546b21

Please sign in to comment.