Return 500 on error during session query
This commit is contained in:
parent
59ce2bbc8e
commit
d876997eeb
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue