Skip to content

Commit

Permalink
Merge pull request #220 from Revolyssup/viper
Browse files Browse the repository at this point in the history
Add meshkit error for config err
  • Loading branch information
Revolyssup authored Oct 4, 2022
2 parents 7142f4d + 8e0ebb6 commit d735cb7
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 d735cb7

Please sign in to comment.