Skip to content

Commit

Permalink
Add meshkit error for config err
Browse files Browse the repository at this point in the history
Signed-off-by: revolyssup <[email protected]>
  • Loading branch information
Revolyssup committed Oct 4, 2022
1 parent 5aa4cb7 commit 8e0ebb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ var (

// ErrViper returns a MeshKit error indicating an (initialization) error in the Viper provider.
func ErrViper(err error) error {
return errors.New(ErrViperCode, errors.Fatal, []string{"Viper configuration initialization failed"}, []string{}, []string{"Viper is crashing"}, []string{"Make sure viper is configured properly"})
return errors.New(ErrViperCode, errors.Fatal, []string{"Viper configuration initialization failed"}, []string{err.Error()}, []string{"Viper is crashing"}, []string{"Make sure viper is configured properly"})
}

// ErrViper returns a MeshKit error indicating an (initialization) error in the in-memory provider.
func ErrInMem(err error) error {
return errors.New(ErrInMemCode, errors.Fatal, []string{"InMem configuration initialization failed"}, []string{}, []string{"In memory map is crashing"}, []string{"Make sure map is configured properly"})
return errors.New(ErrInMemCode, errors.Fatal, []string{"InMem configuration initialization failed"}, []string{err.Error()}, []string{"In memory map is crashing"}, []string{"Make sure map is configured properly"})
}

0 comments on commit 8e0ebb6

Please sign in to comment.