Skip to content

Commit

Permalink
chore(logs): improve/fix logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yossi-eynav committed Apr 17, 2024
1 parent 6ccf752 commit 203ebc6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/api/lib/mavat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ const fetchPlanData = (planUrl) =>
);
resolve({ data: JSON.parse(jsonContent) });
} catch (e) {
Log.error('Mavat fetch error with puppeteer', e.message);
let innerHTML
try {
innerHTML = await page.$eval('body', element => element.innerHTML);
} catch (e) {}

Log.error({ message: 'Mavat fetch error with puppeteer', error: e, innerHTML});
try {
const jsonContent = await proxy.get(planUrl);
Log.info({ message: 'Mavat with proxy response', jsonContent })
Expand Down

0 comments on commit 203ebc6

Please sign in to comment.