docs: Complete error handling audit
- Add comprehensive audit document tracking all error patterns - Update ERROR_HANDLING.md with metadata distinction guidelines - Document init.go error handling patterns with metadata notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -203,6 +203,11 @@ With --no-db: creates .beads/ directory and issues.jsonl file instead of SQLite
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// === CONFIGURATION METADATA (Pattern A: Fatal) ===
|
||||
// Configuration metadata is essential for core functionality and must succeed.
|
||||
// These settings define fundamental behavior (issue IDs, sync workflow).
|
||||
// Failure here indicates a serious problem that prevents normal operation.
|
||||
|
||||
// Set the issue prefix in config
|
||||
if err := store.SetConfig(ctx, "issue_prefix", prefix); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: failed to set issue prefix: %v\n", err)
|
||||
@@ -231,6 +236,11 @@ With --no-db: creates .beads/ directory and issues.jsonl file instead of SQLite
|
||||
}
|
||||
}
|
||||
|
||||
// === TRACKING METADATA (Pattern B: Warn and Continue) ===
|
||||
// Tracking metadata enhances functionality (diagnostics, version checks, collision detection)
|
||||
// but the system works without it. Failures here degrade gracefully - we warn but continue.
|
||||
// Examples: bd_version enables upgrade warnings, repo_id/clone_id help with collision detection.
|
||||
|
||||
// Store the bd version in metadata (for version mismatch detection)
|
||||
if err := store.SetMetadata(ctx, "bd_version", Version); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to store version metadata: %v\n", err)
|
||||
|
||||
Reference in New Issue
Block a user