Skip to content

Commit

Permalink
handle more exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
JSCU-CNI committed Nov 26, 2024
1 parent c482853 commit e852c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/record/adapter/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", str(exc))
self.exception = exc.exc_value if hasattr(exc, "exc_value") else exc

Check warning on line 87 in flow/record/adapter/elastic.py

View check run for this annotation

Codecov / codecov/patch

flow/record/adapter/elastic.py#L86-L87

Added lines #L86 - L87 were not covered by tests
self.event.set()
self.close()

Expand Down

0 comments on commit e852c5e

Please sign in to comment.