confluent-kafka-javascript icon indicating copy to clipboard operation
confluent-kafka-javascript copied to clipboard

Add producer errors, and convert delivery report error from string to code for richer errors

Open milindl opened this issue 2 years ago • 0 comments

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).

milindl avatar Nov 29 '23 12:11 milindl