Closes #169 feedback for username/group name already taken

This commit is contained in:
Benjamin Gamard
2018-01-04 16:18:06 +01:00
parent 4cc3fa4d89
commit cf44af0065
5 changed files with 20 additions and 2 deletions
@@ -114,7 +114,7 @@ public class UserResource extends BaseResource {
userDao.create(user, principal.getId());
} catch (Exception e) {
if ("AlreadyExistingUsername".equals(e.getMessage())) {
throw new ServerException("AlreadyExistingUsername", "Login already used", e);
throw new ClientException("AlreadyExistingUsername", "Login already used", e);
} else {
throw new ServerException("UnknownError", "Unknown server error", e);
}