error handling logging and debug to server console
This commit is contained in:
+21
-8
@@ -187,15 +187,28 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
let loginEmailStr = "";
|
||||
|
||||
if (hasLoginCode == true) {
|
||||
(loginEmailStr = hashString(thisSession.user.email)),
|
||||
(portalUserObj = await getPortalLogin(
|
||||
thisSession.user.email,
|
||||
relayToken
|
||||
)),
|
||||
console.log("loggin user stuff: ", portalUserObj),
|
||||
store.dispatch(setAccountDetails(portalUserObj));
|
||||
loginEmailStr = hashString(thisSession.user.email);
|
||||
portalUserObj = await getPortalLogin(
|
||||
thisSession.user.email,
|
||||
relayToken
|
||||
);
|
||||
|
||||
if (_.has(portalUserObj, "status") != false) {
|
||||
if (portalUserObj.status == 400) {
|
||||
return {
|
||||
redirect: {
|
||||
//destination: "/dns-not-found",
|
||||
destination: "/error",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
console.log("loggin user stuff: ", portalUserObj);
|
||||
store.dispatch(setAccountDetails(portalUserObj));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log("no session");
|
||||
console.log("empty session");
|
||||
}
|
||||
|
||||
if (ggToken.status == 400) {
|
||||
|
||||
Reference in New Issue
Block a user