mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Catch new invalid user name error added in https://github.com/matrix-org/synapse/pull/499 and https://github.com/matrix-org/matrix-doc/pull/263
This commit is contained in:
parent
81329a42fd
commit
dcfcc51f4c
@ -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_USER_NAME') {
|
||||
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 New Issue
Block a user