feat: enhance error handling with specific error types and recovery suggestions#53
feat: enhance error handling with specific error types and recovery suggestions#53DavidBrunow wants to merge 1 commit intomainfrom
Conversation
Release notes: [0.2.0] - 2025-07-28Features
GitClientTests: Coverage: 88.78
ModelTests: Coverage: 98.65
SwiftConventionalCommitParserTests: Coverage: 99.51
swift-conventional-commit-parserTests: Coverage: 96.23
Generated by 🚫 Danger Swift against 4477e84 |
05a94ff to
ff8059b
Compare
…uggestions - Add GitError, ParseError, and ConfigurationError types with detailed recovery suggestions - Replace generic ParserError with specific ParseError types for better diagnostics - Enhance ConventionalCommit validation to reject empty types and descriptions - Implement smart error suggestion logic that avoids redundant suggestions - Update command error handling with proper stderr output and exit codes - Fix duplicate CHANGELOG.md entries 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ff8059b to
4477e84
Compare
Summary
Error Type Improvements
GitError
ParseError
ConfigurationError
Smart Error Display
Commands now intelligently add recovery suggestions only when the original error message lacks guidance (doesn't contain "Learn more" or URLs), preventing redundant suggestions while enhancing basic error messages.
Test Coverage
Files Changed
Sources/Model/GitError.swift- Git operation errorsSources/Model/ParseError.swift- Parsing errorsSources/Model/ConfigurationError.swift- Configuration errorsSources/SwiftConventionalCommitParser/Parser.swift- Use ParseError instead of ParserErrorSources/Model/ConventionalCommit.swift- Enhanced validationCHANGELOG.md- Removed duplicate entries🤖 Generated with Claude Code