Skip to content

fix : correct additional_data truthiness check in error_logger.log_exception - #1864

Open
tmdeveloper007 wants to merge 1 commit into
steam-bell-92:mainfrom
tmdeveloper007:pr-1859
Open

fix : correct additional_data truthiness check in error_logger.log_exception#1864
tmdeveloper007 wants to merge 1 commit into
steam-bell-92:mainfrom
tmdeveloper007:pr-1859

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

In error_logger.py, the log_exception function used if additional_data: to guard the line that adds additional_data to the log payload. This is incorrect because an empty dict {} evaluates to False in Python's truthiness check, so explicitly passing additional_data={} would silently not include it in the logged payload.

Changes Made

Changed if additional_data: to if additional_data is not None: so that an empty dict is correctly included while None is skipped.

Impact it Made

  • Empty dicts passed as additional_data are now correctly included in the log payload.
  • Prevents silent data loss when callers explicitly pass additional_data={}.

Closes #1859.

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : correct additional_data truthiness check in error_logger.log_exception

1 participant