diff --git a/flow/record/adapter/elastic.py b/flow/record/adapter/elastic.py index 3643cec..ad0de30 100644 --- a/flow/record/adapter/elastic.py +++ b/flow/record/adapter/elastic.py @@ -83,8 +83,8 @@ def __init__( self.metadata_fields[arg_key[6:]] = arg_val def excepthook(self, exc: threading.ExceptHookArgs, *args, **kwargs) -> None: - log.error("Exception in thread: %s", exc.exc_value.message) - self.exception = exc.exc_value + log.error("Exception in thread: %s", exc) + self.exception = getattr(exc, "exc_value", exc) self.event.set() self.close()