feat(database): improve error handling (#1633)

This commit is contained in:
ze0s 2024-08-29 09:00:53 +02:00 committed by GitHub
parent cc0cca9f0d
commit accc875960
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 56 additions and 44 deletions

View file

@ -616,12 +616,8 @@ func (r *ActionRepo) Get(ctx context.Context, req *domain.GetActionRequest) (*do
}
row := r.db.handler.QueryRowContext(ctx, query, args...)
if err != nil {
return nil, errors.Wrap(err, "error executing query")
}
if err := row.Err(); err != nil {
return nil, errors.Wrap(err, "rows error")
return nil, errors.Wrap(err, "error executing query")
}
var a domain.Action