Open gfoltz opened 10 months ago
Thanks a lot for your work. We're also missing something like this. So we can see what permission is missing for which topic. I really hope this one will make it into a a release asap.
@Nevon @tulios Can you approve?
I was doing literally this PR before finding it here, I think it is a really good thing to add ASAP
This fixes https://github.com/tulios/kafkajs/issues/957 and https://github.com/tulios/kafkajs/issues/129
A generic
KafkaJSProtocolError
is thrown when a kafka client tries to use a topic that is unknown to the broker or unauthorized for the client. Including the topic name in these cases is very useful for debugging because it allows the engineer to more rapidly know what needs to change with their cluster.This PR includes the following:
KafkaJSUnknownTopic
error which includes atopic
propertyKafkaJSTopicAuthorizationFailed
error which includes a `topic propertyerror.topic
value is included in the log context with the log line.