Skip to content

Commit 29ce557

Browse files
committed
indentation
1 parent 26ed6ab commit 29ce557

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

posthog/ai/langchain/callbacks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,8 @@ def _capture_exception_and_update_properties(
892892
properties=event_properties,
893893
)
894894

895-
event_properties["$exception_event_id"] = exception_id
895+
if exception_id:
896+
event_properties["$exception_event_id"] = exception_id
896897

897898
return event_properties
898899

posthog/ai/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ def call_llm_and_track_usage(
353353
groups=posthog_groups,
354354
)
355355

356-
if error:
357-
raise error
356+
if error:
357+
raise error
358358

359359
return response
360360

@@ -474,10 +474,10 @@ async def call_llm_and_track_usage_async(
474474
groups=posthog_groups,
475475
)
476476

477-
if error:
478-
raise error
477+
if error:
478+
raise error
479479

480-
return response
480+
return response
481481

482482

483483
def sanitize_messages(data: Any, provider: str) -> Any:

0 commit comments

Comments
 (0)