Subject: | Invalid partition number causes indeterminate error message |
Date: | Sat, 17 Jan 2015 19:08:04 +0000 |
To: | bug-Kafka [...] rt.cpan.org |
From: | Hari Sekhon <harisekhon [...] gmail.com> |
Hi,
When supplying a partition that doesn't exist in a topic such as partition
4 when calling $producer->send() and there are only partitions 0 - 3 the
error message returned does not allow the client programmer to determine
the cause, all that is returned is this line below:
: topic = '<topic>'
This doesn't allow much in the way of debugging, can this be changed?
Luckily I'm causing this intentionally to test error handling in my program
so I know I'm causing it by changing a single input to supply a partition
number that is too high.
The exact same happens if supplying a character instead of a number.
I think the error handling should first check the partition is a positive
integer else error specifically that partition must be a positive integer,
and then check if the partition isn't valid to raise that specific error
about no such partition in that topic to be helpful to client programmers?
Best Regards,
Hari Sekhon
http://www.linkedin.com/in/harisekhon