fix: narrow exception in kimi skill detection from Exception to specific types - #3923
Open
Quratulain-bilal wants to merge 1 commit into
Open
fix: narrow exception in kimi skill detection from Exception to specific types#3923Quratulain-bilal wants to merge 1 commit into
Quratulain-bilal wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Narrows Kimi skill-detection exception handling to expected YAML/import failures.
Changes:
- Replaces broad
Exceptionhandling with specific exception types.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/kimi/__init__.py |
Narrows YAML parsing exceptions. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
|
|
||
| frontmatter = yaml.safe_load(parts[1]) | ||
| except Exception: | ||
| except (ImportError, yaml.YAMLError): |
mnriem
requested changes
Aug 21, 2026
mnriem
left a comment
Collaborator
There was a problem hiding this comment.
Please address Copilot feedback and CI errors
…fic types Bare 'except Exception' catches everything including MemoryError, RecursionError, etc. Narrow to (ImportError, yaml.YAMLError) which are the realistic failure modes.
Quratulain-bilal
force-pushed
the
fix/kimi-narrow-exception
branch
from
August 24, 2026 17:39
3406555 to
70728aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Bare
except Exceptioncatches everything includingMemoryError,RecursionError, etc.Fix
Narrow to
(ImportError, yaml.YAMLError)which are the realistic failure modes.