Skip to content

Commit

Permalink
Merge pull request #387 from milas/validation-errs
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeloof authored Apr 17, 2023
2 parents dff689d + 35d93c4 commit 5390f0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func Load(configDetails types.ConfigDetails, options ...func(*Options)) (*types.
}
dict, err := parseConfig(file.Content, opts)
if err != nil {
return nil, err
return nil, fmt.Errorf("parsing %s: %w", file.Filename, err)
}
configDict = dict
file.Config = dict
Expand All @@ -202,7 +202,7 @@ func Load(configDetails types.ConfigDetails, options ...func(*Options)) (*types.

if !opts.SkipValidation {
if err := schema.Validate(configDict); err != nil {
return nil, err
return nil, fmt.Errorf("validating %s: %w", file.Filename, err)
}
}

Expand Down

0 comments on commit 5390f0a

Please sign in to comment.