Skip to content

Commit d38b2f8

Browse files
committed
login page check
1 parent 7dc7ce5 commit d38b2f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

api/utils/render.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ exports.renderView = function(options, cb) {
118118
};
119119

120120
page.setDefaultNavigationTimeout(updatedTimeout);
121-
122-
await page.goto(host + '/login/token/' + token + '?ssr=true');
121+
const resp = await page.goto(host + '/login/token/' + token + '?ssr=true');
122+
const status = resp?.status();
123+
if (status !== 200) {
124+
throw new Error(`Failed to open login page. Status: ${status}`);
125+
}
123126

124127
await page.waitForSelector('countly', {timeout: updatedTimeout});
125128

0 commit comments

Comments
 (0)