karafka / waterdrop

Standalone Karafka library for producing Kafka messages

Home Page:https://karafka.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve error reporting - include cause in the BaseError#inspect

knovoselic opened this issue · comments

Hi! I've noticed that the errors that WaterDrop raises are missing very important details in some cases, and those details can be found in the underlying error (accessed via #cause). Because the default inspect implementation does not include any details about the error in cause, the reported error in logs usually looks like this:

WaterDrop::Errors::ProduceError (WaterDrop::Errors::ProduceError):
... stack trace ...
...

It would be great if WaterDrop::Errors::BaseError would override inspect to also print out the cause exception, providing all of the details at once.