Review comments: If-statement style
This commit is contained in:
parent
f168f9cd06
commit
4f860b4c6d
1 changed files with 2 additions and 4 deletions
|
@ -206,14 +206,12 @@ class Register extends Signup {
|
||||||
let msg = null;
|
let msg = null;
|
||||||
if (error.message) {
|
if (error.message) {
|
||||||
msg = error.message;
|
msg = error.message;
|
||||||
}
|
} else if (error.errcode) {
|
||||||
else if (error.errcode) {
|
|
||||||
msg = error.errcode;
|
msg = error.errcode;
|
||||||
}
|
}
|
||||||
if (msg) {
|
if (msg) {
|
||||||
throw new Error(`Registration failed! (${error.httpStatus}) - ${msg}`);
|
throw new Error(`Registration failed! (${error.httpStatus}) - ${msg}`);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new Error(`Registration failed! (${error.httpStatus}) - That's all we know.`);
|
throw new Error(`Registration failed! (${error.httpStatus}) - That's all we know.`);
|
||||||
}
|
}
|
||||||
} else if (error.httpStatus >= 500 && error.httpStatus < 600) {
|
} else if (error.httpStatus >= 500 && error.httpStatus < 600) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue