no rows is not an error
Ted Unangst tedu@tedunangst.com
Fri, 19 Apr 2019 23:00:46 -0400
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
honk.go
→
honk.go
@@ -568,7 +568,9 @@ row := stmtOneXonk.QueryRow(xid)
err := row.Scan(&h.ID, &h.UserID, &h.Username, &h.What, &h.Honker, &h.XID, &h.RID, &dt, &h.URL, &aud, &h.Noise, &h.Convoy) if err != nil { - log.Printf("error scanning xonk: %s", err) + if err != sql.ErrNoRows { + log.Printf("error scanning xonk: %s", err) + } return nil } if name != "" && h.Username != name {