diff --git a/conductor-clients/java/conductor-java-sdk/orkes-client/src/main/java/io/orkes/conductor/client/ApiClient.java b/conductor-clients/java/conductor-java-sdk/orkes-client/src/main/java/io/orkes/conductor/client/ApiClient.java index c7b8d449d..3d1ef30c5 100644 --- a/conductor-clients/java/conductor-java-sdk/orkes-client/src/main/java/io/orkes/conductor/client/ApiClient.java +++ b/conductor-clients/java/conductor-java-sdk/orkes-client/src/main/java/io/orkes/conductor/client/ApiClient.java @@ -150,6 +150,10 @@ public static ApiClientBuilder builder() { public static class ApiClientBuilder extends Builder { public ApiClientBuilder credentials(String key, String secret) { + if (key == null || secret == null) { + throw new IllegalArgumentException("Key and secret must not be null"); + } + this.addHeaderSupplier(new OrkesAuthentication(key, secret)); return this; }