Skip to content

Commit

Permalink
node: fail gracefully on error from config validation
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Butusov <[email protected]>
  • Loading branch information
End-rey committed Nov 29, 2024
1 parent 56f54a6 commit 57d1485
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/neofs-node/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

import (
"fmt"
"log"
"strings"

"github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/internal"
Expand Down Expand Up @@ -58,7 +59,7 @@ func New(_ Prm, opts ...Option) *Config {
if o.validate {
err := validate.ValidateStruct(v)
if err != nil {
panic(err)
log.Fatalf("failed config validation: %v", err)

Check warning on line 62 in cmd/neofs-node/config/config.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-node/config/config.go#L62

Added line #L62 was not covered by tests
}
}

Expand Down

0 comments on commit 57d1485

Please sign in to comment.