TokenStore migration to return plain errors (#14875)
* TokenStore migration to return plain errors * Fix translations * Fix: returned error is ignored and http.StatusBadRequest is always returned * Fix * Fix translations * Suggestions * Changed from BadRequest to NotFound * Setting the correct http status * Changed test to expect 404 status * Fix error
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4df6019f61
Коммит
8b6a5fc5d7
@@ -1826,8 +1826,8 @@ func TestAddTeamMember(t *testing.T) {
|
||||
|
||||
require.Equal(t, tm.TeamId, team.Id, "team ids should have matched")
|
||||
|
||||
_, err = th.App.Srv().Store.Token().GetByToken(token.Token)
|
||||
require.NotNil(t, err, "The token must be deleted after be used")
|
||||
_, nErr := th.App.Srv().Store.Token().GetByToken(token.Token)
|
||||
require.NotNil(t, nErr, "The token must be deleted after be used")
|
||||
|
||||
tm, resp = Client.AddTeamMemberFromInvite("junk", "")
|
||||
CheckBadRequestStatus(t, resp)
|
||||
|
||||
Ссылка в новой задаче
Block a user