Skip to content

Commit

Permalink
[plugins/posthog][chore] Log conversion errors (#2268)
Browse files Browse the repository at this point in the history
  • Loading branch information
lloesche authored Oct 29, 2024
1 parent 381f8a1 commit a0d35cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/posthog/fix_plugin_posthog/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import datetime
from attrs import define
from typing import Optional, ClassVar, List, Dict
from fixlib.logger import log
from fixlib.graph import Graph
from fixlib.baseresources import BaseAccount, BaseResource

Expand Down Expand Up @@ -115,5 +116,6 @@ def new(data: Dict) -> BaseResource:
def convert_date(isodate_str: str) -> Optional[datetime]:
try:
return datetime.strptime(isodate_str, "%Y-%m-%dT%H:%M:%S.%fZ")
except Exception:
except Exception as e:
log.debug(f"Error converting date: {e}")
return None

0 comments on commit a0d35cb

Please sign in to comment.