summaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-11-28 22:40:04 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-11-28 22:40:04 +0530
commite2afed3a8b63d4559812d1923a700513330972aa (patch)
tree6e3960523c87a7295db66c1266bc9cd0bd74fe8c /handlers
parent3f997bbfdc53ad68a025e65831197197727a3ce3 (diff)
handlers - adding log for ID not Found error
Diffstat (limited to 'handlers')
-rw-r--r--handlers/handlers.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/handlers/handlers.go b/handlers/handlers.go
index 62b9ac0..1505f08 100644
--- a/handlers/handlers.go
+++ b/handlers/handlers.go
@@ -107,6 +107,7 @@ func VerifyHash(c echo.Context) error {
err = db.QueryRow("SELECT HashValue FROM hashes WHERE ID = ?", id).Scan(&storedHash)
if err != nil {
if err == sql.ErrNoRows {
+ log.Println("ID not Found")
return c.JSON(http.StatusNotFound, map[string]string{"message": "2"})
}
log.Println("Failed to query database:", err)