Skip to content

fix : simplified log_exception traceback handling in error_logger.py - #1345

Open
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:#1340
Open

fix : simplified log_exception traceback handling in error_logger.py#1345
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:#1340

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

Simplified the traceback handling in log_exception in src/utils/error_logger.py by using a truthiness check (if exc) instead of an explicit is not None comparison.

Changes Made

# Before:
tb = (
    "".join(traceback.format_exception(type(exc), exc, exc.__traceback__))
    if exc is not None
    else "No traceback available"
)

# After:
tb = "".join(traceback.format_exception(type(exc), exc, exc.__traceback__)) if exc else "No traceback available"

Impact it Made

  • Cleaner, more idiomatic Python code
  • No functional change for intended use cases (exceptions and None)
  • Improved code readability

Closes #1340

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the komalsony234-1530'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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : simplify log_exception traceback handling in error_logger.py

1 participant