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
@@ -256,7 +256,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
|
||||
_, resp := th.Client.CreateUserWithToken(&user, "wrong")
|
||||
CheckBadRequestStatus(t, resp)
|
||||
CheckNotFoundStatus(t, resp)
|
||||
CheckErrorMessage(t, resp, "api.user.create_user.signup_link_invalid.app_error")
|
||||
})
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user