From 122e2afa1b0bbdb5d40c92064ff2804e0172c611 Mon Sep 17 00:00:00 2001 From: Howl Date: Mon, 30 May 2016 19:18:31 +0200 Subject: [PATCH] Don't log message in get_user if it's an ErrNoRows --- app/peppy/user.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/peppy/user.go b/app/peppy/user.go index 0b297a1..2e1946c 100644 --- a/app/peppy/user.go +++ b/app/peppy/user.go @@ -43,7 +43,9 @@ func GetUser(c *gin.Context, db *sql.DB) { ) if err != nil { c.JSON(200, defaultResponse) - c.Error(err) + if err != sql.ErrNoRows { + c.Error(err) + } return } if !display {