Commit 8ed2296
Use sentinel error for nil command provider
Replace dynamic error with sentinel error ErrCommandNil for proper
error wrapping and type-safe error checking.
Changes:
- Import errors package in cmd/internal/registry.go
- Use fmt.Errorf with %w to wrap ErrCommandNil sentinel error
- Import errors package in registry_test.go
- Update test to use errors.Is() for sentinel error checking
- Verify error message includes provider name for debugging
This follows Atmos error handling conventions per CLAUDE.md:
- All errors wrapped using static errors from errors/errors.go
- Use errors.Is() for error checking
- Use fmt.Errorf with %w for adding context
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent bf0c81c commit 8ed2296
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | | - | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments