Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message when broker list is empty #454

Closed
miton18 opened this issue Aug 6, 2019 · 2 comments
Closed

Better error message when broker list is empty #454

miton18 opened this issue Aug 6, 2019 · 2 comments

Comments

@miton18
Copy link

miton18 commented Aug 6, 2019

When, by a misconfiguration, you try to instantiate a new Kafka({ brokers: [] })

The error is not very easy to understand:

TypeError: Cannot read property 'split' of undefined

caused by https://github.com/tulios/kafkajs/blob/master/src/cluster/connectionBuilder.js#L24

we can easily check brokers.length before doing anything

@miton18
Copy link
Author

miton18 commented Aug 8, 2019

Proposal #458

Nevon added a commit that referenced this issue Aug 9, 2019
…builder

Issue #454 proposal - Adding validation to connectionBuilder
@Nevon
Copy link
Collaborator

Nevon commented Aug 10, 2019

Fixed in #460.

@Nevon Nevon closed this as completed Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants