mirror of https://github.com/containers/podman.git
Fix an improperly ignored error in SQLite
This looks like a case of boilerplate error handling making it too easy to miss a legitimately ignored error, which is annoying. In a more featureful language most of the SQL code here could be macros (at the very least, Rust would have forced us to handle all error cases, not just the one seen here). Found while looking through the Libpod DB code, no actual bug I can think of associated with this. Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
parent
f0f148ead4
commit
6e027c0e37
|
@ -2157,6 +2157,7 @@ func (s *SQLiteState) Volume(name string) (*Volume, error) {
|
|||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, define.ErrNoSuchVolume
|
||||
}
|
||||
return nil, fmt.Errorf("querying volume %s: %w", name, err)
|
||||
}
|
||||
|
||||
vol := new(Volume)
|
||||
|
|
Loading…
Reference in New Issue