From 1eb3a5ae9710256b2da07d9382a6278cd0b6c397 Mon Sep 17 00:00:00 2001 From: tux-mind Date: Sun, 16 Apr 2017 21:15:51 +0200 Subject: [PATCH] DB errors over NotFound Errors comings from DB have higher priority than logic ones --- callback_query.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/callback_query.go b/callback_query.go index 4ed1705e..20e88161 100644 --- a/callback_query.go +++ b/callback_query.go @@ -80,9 +80,7 @@ func queryCallback(scope *Scope) { if err := rows.Err(); err != nil { scope.Err(err) - } - - if scope.db.RowsAffected == 0 && !isSlice { + } else if scope.db.RowsAffected == 0 && !isSlice { scope.Err(ErrRecordNotFound) } }