refactor(errors): implement structured error handling for improved debugging

This commit is contained in:
Yar Kravtsov
2025-06-03 07:58:21 +03:00
parent 3cba309c05
commit 1e2c9704f3
15 changed files with 482 additions and 213 deletions

View File

@@ -157,7 +157,7 @@ func (suite *CLITestSuite) TestStatusCommand() {
// Test status without remote - should fail
err = suite.runCommand("status")
suite.Error(err)
suite.Contains(err.Error(), "no remote configured")
suite.Contains(err.Error(), "No remote repository is configured")
}
func (suite *CLITestSuite) TestListCommand() {
@@ -247,7 +247,7 @@ func (suite *CLITestSuite) TestErrorHandling() {
name: "add nonexistent file",
args: []string{"add", "/nonexistent/file"},
wantErr: true,
errContains: "File does not exist",
errContains: "File or directory not found",
},
{
name: "status without init",