Improve error reporting - include cause in the BaseError#inspect
knovoselic opened this issue · comments
Kristijan Novoselić commented
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.