Skip to content

Commit fd46ae1

Browse files
committed
fix case when parse error overrides joined errors
1 parent a59cb58 commit fd46ae1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/pgengine/transaction.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ func (pge *PgEngine) ExecuteSQLCommand(ctx context.Context, executor executor, t
131131
if val == "" {
132132
continue
133133
}
134-
if err = json.Unmarshal([]byte(val), &params); err != nil {
134+
if parseErr := json.Unmarshal([]byte(val), &params); parseErr != nil {
135+
err = errors.Join(err, fmt.Errorf("failed to parse parameter %s: %w", val, parseErr))
135136
return
136137
}
137138
ct, e := executor.Exec(ctx, task.Command, params...)

0 commit comments

Comments
 (0)