From 2611238b7aa38b1c69b6d7efbccd53d579b983fc Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sun, 18 Feb 2024 17:02:39 -0800 Subject: [PATCH] debug log and fail with unauthenticated when null token --- .../apollo/archipelago/client/FernetCallCredentials.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/client/FernetCallCredentials.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/client/FernetCallCredentials.java index ed92c07ac..c94e69607 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/client/FernetCallCredentials.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/client/FernetCallCredentials.java @@ -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();