confluent-kafka-javascript
confluent-kafka-javascript copied to clipboard
Add producer errors, and convert delivery report error from string to code for richer errors
Adds producer errors.
Also includes a separate commit for a C++ change, rationale for which is explained below -
Rationale:
See LibrdKafkaError.create.
There, we convert the err object returned in cpp, to a LibrdKafkaError. In the previous situation, we were just sending the error message. We use this message to initialize the error, and then, it leads to the error code being set to ERR__UNKNOWN.
If we send the error code itself, we can recover the message (since we have a utility to convert from err code to librdkafka error message).