Return 500 on error during session query

This commit is contained in:
ekzyis 2023-09-09 22:52:50 +02:00
parent 59ce2bbc8e
commit d876997eeb
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ func sessionHandler(next echo.HandlerFunc) echo.HandlerFunc {
// session found
c.Set("session", Session{pubkey})
} else if err != sql.ErrNoRows {
c.Logger().Error(err)
return c.JSON(http.StatusInternalServerError, map[string]string{"status": "ERROR", "reason": "internal server error"})
}
return next(c)
}