Commit 0ba634e5 authored by Julien Schröter's avatar Julien Schröter Committed by Simon Metzler

Change HTTP Status of POST /duel no-common-pools answer to Conflict

parent b5ef479d
Pipeline #1621 passed with stages
in 17 minutes and 56 seconds
......@@ -121,7 +121,7 @@ func postDuel(repository DuelQuery, sessionRepository refreshjwt.RefreshJWTQuery
case ErrUserNotFound:
ctx.AbortWithError(http.StatusNotFound, err)
case ErrNoCommonPool:
ctx.AbortWithError(http.StatusOK, err)
ctx.AbortWithError(http.StatusConflict, err)
raven.CaptureError(err, nil)
ctx.AbortWithError(http.StatusInternalServerError, err)
......@@ -80,7 +80,7 @@ func testPostErrNoCommonPools(router *gin.Engine) func(t *testing.T) {
router.ServeHTTP(res, req)
assert.Equal(t, 200, res.Code, "Should respond with no common pools message but was: "+res.Body.String())
assert.Equal(t, 409, res.Code, "Should respond with no common pools message but was: "+res.Body.String())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment