Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.stripe.net;

import com.stripe.exception.ApiKeyMissingException;
import com.stripe.exception.AuthenticationException;
import com.stripe.exception.StripeException;
import com.stripe.util.StringUtils;
Expand All @@ -11,7 +12,7 @@ public final class BearerTokenAuthenticator implements Authenticator {

public BearerTokenAuthenticator(String apiKey) {
if (apiKey == null) {
throw new IllegalArgumentException("apiKey should be not-null");
throw new ApiKeyMissingException("API key cannot be null. Set Stripe.apiKey");
}
this.apiKey = apiKey;
}
Expand Down