From 1f055e92d42baeac360ca43a5d90896e1cf34d49 Mon Sep 17 00:00:00 2001 From: nochill Date: Wed, 27 Sep 2023 22:34:52 +0700 Subject: [PATCH] add error message user not found --- api/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/user.go b/api/user.go index 8113e1a..9c22dec 100644 --- a/api/user.go +++ b/api/user.go @@ -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"))