Skip to content

Commit 1732efd

Browse files
committed
fix: add safeguard for OTel logs
1 parent 05b0df8 commit 1732efd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/src/zcs/core/logger/logger.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ def record_factory(*args, **kwargs):
1818

1919
# Set original exception value if needed
2020
record.original_exception = None
21-
if args[6] is not None:
22-
for arg in args[6]:
21+
value = args[6] if len(args) > 6 else None
22+
if isinstance(value, (list, tuple, set)):
23+
for arg in value:
2324
if isinstance(arg, Exception):
2425
record.original_exception = arg
2526
if isinstance(arg, ZcsException):

0 commit comments

Comments
 (0)