Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugins/posthog][chore] Log conversion errors #2268

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading