Review comments: If-statement style
This commit is contained in:
+2
-4
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user