Skip to content

Clean up redundant SQLAlchemyError handling in ti_run after app-level handler added#8

Closed
Copilot wants to merge 3 commits intoreplace-to-fastapi-custom-exceptionfrom
copilot/sub-pr-6
Closed

Clean up redundant SQLAlchemyError handling in ti_run after app-level handler added#8
Copilot wants to merge 3 commits intoreplace-to-fastapi-custom-exceptionfrom
copilot/sub-pr-6

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 22, 2026

PR #6 added a centralized SQLAlchemyError exception handler in app.py, but left a no-op try/except in ti_run that catches and immediately re-raises with no side effects.

Changes

  • task_instances.py: Remove the redundant try/except SQLAlchemyError: raise block wrapping the body of ti_run — the app-level handler in app.py already covers this
  • task_instances.py: Remove now-unused SQLAlchemyError from the sqlalchemy.exc import

The ti_update_state function was already correctly cleaned up in PR #6 (try-except removed entirely). This brings ti_run in line with the same pattern.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: henry3260 <108824346+henry3260@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Apr 14, 2026
@github-actions github-actions Bot closed this Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants