add error message user not found
This commit is contained in:
parent
675abcdb18
commit
1f055e92d4
@ -135,7 +135,7 @@ func (server *Server) login(ctx *gin.Context) {
|
||||
user, err := server.Store.GetUser(ctx, req.Username)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
ctx.JSON(http.StatusNotFound, ErrorResponse(err, ""))
|
||||
ctx.JSON(http.StatusNotFound, ErrorResponse(err, "User not found"))
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusInternalServerError, ErrorResponse(err, "Something went wrong whlie try to get user"))
|
||||
|
Loading…
Reference in New Issue
Block a user