Skip to content

Commit 8a96c81

Browse files
authored
Apply suggestion from @hamza-mohd
Signed-off-by: Mohd Hamza <135669921+hamza-mohd@users.noreply.github.com>
1 parent b36f2f8 commit 8a96c81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
- Structured errors follow strict repository conventions so `errorutil` can understand them:
3939
- define concrete errors in each package's `error.go`
4040
- define code symbols matching `^Err[A-Z].+Code$`
41-
- create errors with `errors.New(...)` (or `errors.NewV2(...)` when needed; the `(*errors.Error).ErrorV2(...)` helper may also be used where applicable)
41+
- create errors with `errors.NewV2(...)` when no existing error is a well-suited fit; the `(*errors.Error).NewV2(...)` helper may also be used where applicable)
4242
- keep static text in the description/cause/remediation arrays as string literals rather than composed constants/concatenations
4343
- If you add or modify structured errors, run `make errorutil` and usually `make errorutil-analyze`. `errorutil` expects `component_info.json` metadata and emits `errorutil_analyze_*.json` plus `errorutil_errors_export.json` artifacts under `helpers/`.
4444
- MeshModel registration assumes an imported package/directory contains **exactly one model definition** and then any number of components/relationships associated with it.

0 commit comments

Comments
 (0)