silviucpp / erlkaf

Erlang kafka driver based on librdkafka
MIT License
83 stars 41 forks source link

Translate error code #48

Closed VitorTrin closed 1 year ago

VitorTrin commented 1 year ago

I called the erkaf:produce function and got {:error, 29}, which is not very helpful. The signature of the function says that reason is anything, but there is already an internal mapping in erlkaf_private.hrl, is there no way that erlkaf can attempt to translate the error before returning?

silviucpp commented 1 year ago

Hello,

I guess we can add a method to convert error codes into friendly descriptions. I'm opened to a pull request for this.

Silviu