Skip to content

fix: narrow bare except Exception in invoke separator resolution - #3856

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/agents-narrow-exception
Open

fix: narrow bare except Exception in invoke separator resolution#3856
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/agents-narrow-exception

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Replace overly broad except Exception with (ImportError, ValueError, KeyError) to let programming errors like TypeError or AttributeError propagate.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Narrows exception handling during command invocation-separator resolution so programming errors propagate.

Changes:

  • Limits fallback handling to ImportError, ValueError, and KeyError.
Show a summary per file
File Description
src/specify_cli/agents.py Narrows exceptions caught during separator resolution.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/specify_cli/agents.py
@mnriem

mnriem commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Please address Copilot feedback and fix test & lint errors

…on test

Narrow 'except Exception' to 'except (ImportError, ValueError, KeyError)'
in register_commands() invoke separator resolution. Add regression test
that verifies TypeError propagates instead of being silently swallowed.
@Quratulain-bilal
Quratulain-bilal force-pushed the fix/agents-narrow-exception branch from c68c37e to 70d40fb Compare July 31, 2026 20:06
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.

3 participants