Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

fix: Count diag.PANIC as error #220

Merged
merged 1 commit into from
Apr 12, 2022
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 provider/diag/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (diags Diagnostics) Error() string {

func (diags Diagnostics) HasErrors() bool {
for _, d := range diags {
if d.Severity() == ERROR {
if d.Severity() >= ERROR {
return true
}
}
Expand Down
2 changes: 1 addition & 1 deletion provider/execution/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (e TableExecutor) resolveResourceValues(ctx context.Context, meta schema.Cl
stack := string(debug.Stack())
e.Logger.Error("resolve table recovered from panic", "table", e.Table.Name, "panic_msg", r, "stack", stack)
diags = fromError(fmt.Errorf("column resolve panic: %s", r), diag.WithResourceName(e.ResourceName), diag.WithSeverity(diag.PANIC),
diag.WithSummary("resolve table %q recovered from panic.", e.Table.Name), diag.WithDetails("%s", stack))
diag.WithSummary("resolve table %q recovered from panic", e.Table.Name), diag.WithDetails("%s", stack))
}
}()

Expand Down