TypeError: String includes not contains, #53; only first line of error
This commit is contained in:
parent
d7e5cc4a3a
commit
c5b0065a50
3 changed files with 6 additions and 6 deletions
|
|
@ -195,8 +195,8 @@ try {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error); // .toString()?
|
console.error(error); // .toString()?
|
||||||
if (error.message && !error.message.contains('Target closed')) // e.g. when killed by Ctrl-C
|
if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C
|
||||||
notify(`epic-games failed: ${error.message}`);
|
notify(`epic-games failed: ${error.message.split('\n')[0]}`);
|
||||||
} finally {
|
} finally {
|
||||||
await db.write(); // write out json db
|
await db.write(); // write out json db
|
||||||
if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed?
|
if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed?
|
||||||
|
|
|
||||||
4
gog.js
4
gog.js
|
|
@ -122,8 +122,8 @@ try {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error); // .toString()?
|
console.error(error); // .toString()?
|
||||||
if (!error.message.contains('Target closed')) // e.g. when killed by Ctrl-C
|
if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C
|
||||||
notify(`prime-gaming failed: ${error.message}`);
|
notify(`gog failed: ${error.message.split('\n')[0]}`);
|
||||||
} finally {
|
} finally {
|
||||||
await db.write(); // write out json db
|
await db.write(); // write out json db
|
||||||
if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed?
|
if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed?
|
||||||
|
|
|
||||||
|
|
@ -177,8 +177,8 @@ try {
|
||||||
await page.locator(games_sel).screenshot({ path: p });
|
await page.locator(games_sel).screenshot({ path: p });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error); // .toString()?
|
console.error(error); // .toString()?
|
||||||
if (error.message && !error.message.contains('Target closed')) // e.g. when killed by Ctrl-C
|
if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C
|
||||||
notify(`prime-gaming failed: ${error.message}`);
|
notify(`prime-gaming failed: ${error.message.split('\n')[0]}`);
|
||||||
} finally {
|
} finally {
|
||||||
await db.write(); // write out json db
|
await db.write(); // write out json db
|
||||||
if (notify_games.length) { // list should only include claimed games
|
if (notify_games.length) { // list should only include claimed games
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue