mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Merge pull request #92 from matrix-org/invalid_user_name
Catch new invalid user name error
This commit is contained in:
commit
80c2361805
1 changed files with 2 additions and 0 deletions
|
@ -152,6 +152,8 @@ class Register extends Signup {
|
|||
} else {
|
||||
if (error.errcode === 'M_USER_IN_USE') {
|
||||
throw new Error("Username in use");
|
||||
} else if (error.errcode == 'M_INVALID_USERNAME') {
|
||||
throw new Error("User names may only contain alphanumeric characters, underscores or dots!");
|
||||
} else if (error.httpStatus == 401) {
|
||||
throw new Error("Authorisation failed!");
|
||||
} else if (error.httpStatus >= 400 && error.httpStatus < 500) {
|
||||
|
|
Loading…
Reference in a new issue