M_INVALID_USERNAME to be consistent with param name

pull/21833/head
David Baker 2016-01-15 10:08:16 +00:00
parent dcfcc51f4c
commit 51ce76aeab
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class Register extends Signup {
} else { } else {
if (error.errcode === 'M_USER_IN_USE') { if (error.errcode === 'M_USER_IN_USE') {
throw new Error("Username in use"); throw new Error("Username in use");
} else if (error.errcode == 'M_INVALID_USER_NAME') { } else if (error.errcode == 'M_INVALID_USERNAME') {
throw new Error("User names may only contain alphanumeric characters, underscores or dots!"); throw new Error("User names may only contain alphanumeric characters, underscores or dots!");
} else if (error.httpStatus == 401) { } else if (error.httpStatus == 401) {
throw new Error("Authorisation failed!"); throw new Error("Authorisation failed!");