Skip to content

Commit

Permalink
Merge pull request #38 from MUzairS15/MUzairS15/error-util
Browse files Browse the repository at this point in the history
Fix `meshkit error utility` failing to run.
  • Loading branch information
MUzairS15 authored Oct 4, 2024
2 parents 5a0163b + 88f8f67 commit 509b8e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ all: dep-check build

## Analyze error codes
error: dep-check
go run github.com/layer5io/meshkit/cmd/errorutil -d ../internal/errors analyze -i . -o .
go run github.com/layer5io/meshkit/cmd/errorutil -d . analyze -i ./build -o ./build

## Runs meshkit error utility to update error codes.
error-util:
go run github.com/layer5io/meshkit/cmd/errorutil -d ../internal/errors update -i . -o .
go run github.com/layer5io/meshkit/cmd/errorutil -d . update -i ./build -o ./build



Expand Down
4 changes: 2 additions & 2 deletions build/component_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "helm-kanvas-snapshot",
"name": "kanvas-snapshot",
"type": "component",
"next_error_code": 1000
"next_error_code": 1006
}
11 changes: 6 additions & 5 deletions internal/errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
)

var (
ErrInvalidChartURICode = "kanvas-snapshot-900"
ErrCreatingMesheryDesignCode = "kanvas-snapshot-901"
ErrGeneratingSnapshotCode = "kanvas-snapshot-902"
ErrHTTPPostRequestCode = "kanvas-snapshot-903"
ErrDecodingAPICode = "kanvas-snapshot-905"
ErrInvalidChartURICode = "kanvas-snapshot-1000"
ErrCreatingMesheryDesignCode = "kanvas-snapshot-1001"
ErrGeneratingSnapshotCode = "kanvas-snapshot-1002"
ErrHTTPPostRequestCode = "kanvas-snapshot-1003"
ErrDecodingAPICode = "kanvas-snapshot-1004"
ErrRequiredFieldNotProvidedCode = "kanvas-snapshot-1005"
)

func ErrInvalidChartURI(err error) error {
Expand Down

0 comments on commit 509b8e0

Please sign in to comment.