Skip to content

Commit

Permalink
ir: improve error messages during configuration validation
Browse files Browse the repository at this point in the history
Now it is clear that the error is related to reading the config.

Signed-off-by: Andrey Butusov <[email protected]>
  • Loading branch information
End-rey committed Dec 26, 2024
1 parent e75fda2 commit 40b3260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changelog for NeoFS Node

### Fixed
- `neofs-cli object delete` command output (#3056)
- Make the error message more clearer when validating IR configuration (#3072)

### Changed
- Number of cuncurrenly handled notifications from the chain was increased from 10 to 300 for IR (#3068)
Expand Down
3 changes: 2 additions & 1 deletion cmd/neofs-ir/defaults.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"strings"
"time"

Expand Down Expand Up @@ -37,7 +38,7 @@ func newConfig(path string) (*viper.Viper, error) {

err = validate.ValidateStruct(v)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed config validation: %w", err)

Check warning on line 41 in cmd/neofs-ir/defaults.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-ir/defaults.go#L41

Added line #L41 was not covered by tests
}

return v, nil
Expand Down

0 comments on commit 40b3260

Please sign in to comment.