Skip to content

Commit

Permalink
Fix log in PersistentTopicsBase#getPartitionedTopicMetadata (apache#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
yuruguo authored Dec 6, 2021
1 parent e364848 commit b0f506d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3621,15 +3621,14 @@ public static CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMet
validateAdminAccessForTenant(pulsar,
clientAppId, originalPrincipal, topicName.getTenant(), authenticationData);
} catch (RestException authException) {
log.warn("Failed to authorize {} on cluster {}", clientAppId, topicName.toString());
log.warn("Failed to authorize {} on topic {}", clientAppId, topicName);
throw new PulsarClientException(String.format("Authorization failed %s on topic %s with error %s",
clientAppId, topicName.toString(), authException.getMessage()));
clientAppId, topicName, authException.getMessage()));
}
} catch (Exception ex) {
// throw without wrapping to PulsarClientException that considers: unknown error marked as internal
// server error
log.warn("Failed to authorize {} on cluster {} with unexpected exception {}", clientAppId,
topicName.toString(), ex.getMessage(), ex);
log.warn("Failed to authorize {} on topic {}", clientAppId, topicName, ex);
throw ex;
}

Expand Down

0 comments on commit b0f506d

Please sign in to comment.