Skip to content

Commit 4a11b67

Browse files
fix: debug error in parsing timestamps
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 7bd2955 commit 4a11b67

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

api/app/repositories/exports.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,13 @@ def _format_seen(obj: dict) -> None:
294294
obj[field] = datetime.fromtimestamp(
295295
int(value), tz=timezone.utc
296296
).isoformat(timespec="microseconds")
297-
except (ValueError, TypeError, OverflowError):
298-
pass
297+
except (ValueError, TypeError, OverflowError) as exc:
298+
logger.debug(
299+
"Unable to format %s value %r as timestamp in MISP export: %s",
300+
field,
301+
value,
302+
exc,
303+
)
299304

300305
event = payload.get("Event", {})
301306
_strip_ids(event)

0 commit comments

Comments
 (0)