Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func loadYamlFile(ctx context.Context,
break
}
if err != nil {
return nil, nil, err
return nil, nil, fmt.Errorf("failed to parse %s: %w", file.Filename, err)
}
processor = reset
if err := processRawYaml(raw, processor); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ func TestDecodeErrors(t *testing.T) {

configDetails := buildConfigDetails(dict, nil)
_, err := LoadWithContext(context.TODO(), configDetails)
assert.Error(t, err, "yaml: line 4: found a tab character that violates indentation")
assert.Error(t, err, "failed to parse filename0.yml: yaml: line 4: found a tab character that violates indentation")
}

func TestBuildProperties(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion loader/merge_reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ func Test_DuplicateReset(t *testing.T) {
}, func(options *Options) {
options.SkipNormalization = true
})
assert.Error(t, err, "line 6: mapping key \"command\" already defined at line 5")
assert.Error(t, err, "failed to parse duplicate.yml: line 6: mapping key \"command\" already defined at line 5")
}
2 changes: 1 addition & 1 deletion loader/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ x-healthcheck: &healthcheck
<<: *healthcheck
`,
expectError: true,
errorMsg: "cycle detected: node at path x-healthcheck.egress-service.egress-service references node at path x-healthcheck.egress-service",
errorMsg: "failed to parse (inline): cycle detected: node at path x-healthcheck.egress-service.egress-service references node at path x-healthcheck.egress-service",
},
}

Expand Down
Loading