Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Possible to have more descriptive errors when deleting topics #853

Open
rueberger opened this issue Aug 8, 2018 · 1 comment
Open

Possible to have more descriptive errors when deleting topics #853

rueberger opened this issue Aug 8, 2018 · 1 comment
Labels

Comments

@rueberger
Copy link

Just encountered a scenario where I was trying to delete a topic like this:

cl = pykafka.KafkaClient(...)
test_topic = cl.topics['test'.encode()] 
cl.cluster.controller_broker.delete_topics(['test'.encode()], timeout=1000)

and got a SocketDisconnectedError. Eventually tracked the problem down to topic deletion being disabled in the server config. Not sure if it's feasible to have a more descriptive error here, but it would be useful sometimes.

@emmettbutler
Copy link
Contributor

I'll have to look into this. IIRC Kafka itself isn't super helpful on the request itself when topic deletion is disabled, so handling this error would probably have to involve reading the topic config. If that's the case, I think the best we can reasonably do is to mention that fact in an error message here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants