Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
fix (groups): send error 400 instead of 500 if user does not exist (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecaruchet authored Oct 10, 2018
1 parent a6052d1 commit df70ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (*GroupsController) preCheckUser(ctx *gin.Context, paramJSON *tat.ParamGrou

if !found {
e := errors.New("username " + paramJSON.Username + " does not exist")
ctx.AbortWithError(http.StatusInternalServerError, e)
ctx.AbortWithError(http.StatusBadRequest, e)
return tat.Group{}, e
}

Expand Down

0 comments on commit df70ed5

Please sign in to comment.