Skip to content

Commit

Permalink
debug log and fail with unauthenticated when null token
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Feb 19, 2024
1 parent 02ec584 commit 2611238
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ protected void applyFailure(MetadataApplier applier, Throwable e) {

protected void applyToken(MetadataApplier applier, Token token) {
if (token == null) {
String msg = "Supplied NULL bearer token";
var e = new IllegalArgumentException(msg);
LOGGER.debug(msg, e);
applier.fail(Status.UNAUTHENTICATED.withDescription(msg).withCause(e));
return;
}
Metadata metadata = new Metadata();
Expand Down

0 comments on commit 2611238

Please sign in to comment.