Review comments: If-statement style

pull/21833/head
Kegan Dougal 2017-01-17 10:50:44 +00:00
parent f168f9cd06
commit 4f860b4c6d
1 changed files with 2 additions and 4 deletions

View File

@ -206,14 +206,12 @@ class Register extends Signup {
let msg = null;
if (error.message) {
msg = error.message;
}
else if (error.errcode) {
} else if (error.errcode) {
msg = error.errcode;
}
if (msg) {
throw new Error(`Registration failed! (${error.httpStatus}) - ${msg}`);
}
else {
} else {
throw new Error(`Registration failed! (${error.httpStatus}) - That's all we know.`);
}
} else if (error.httpStatus >= 500 && error.httpStatus < 600) {