Skip to content

fix: narrow exception in kimi skill detection from Exception to specific types - #3923

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

fix: narrow exception in kimi skill detection from Exception to specific types#3923
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/kimi-narrow-exception

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Problem

Bare except Exception catches everything including MemoryError, RecursionError, etc.

Fix

Narrow to (ImportError, yaml.YAMLError) which are the realistic failure modes.

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 Kimi skill-detection exception handling to expected YAML/import failures.

Changes:

  • Replaces broad Exception handling 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 mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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
Quratulain-bilal force-pushed the fix/kimi-narrow-exception branch from 3406555 to 70728aa Compare August 24, 2026 17:39
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