Skip to content

Commit 5048785

Browse files
committed
Add missing error check of rows.Err to load types.
1 parent c00cd65 commit 5048785

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

derived_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ func (c *Conn) LoadTypes(ctx context.Context, typeNames []string) ([]*pgtype.Typ
236236
}
237237
result = append(result, type_)
238238
}
239+
240+
if err := rows.Err(); err != nil {
241+
return nil, fmt.Errorf("While processing rows: %w", err)
242+
}
243+
239244
return result, nil
240245
}
241246

0 commit comments

Comments
 (0)