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) {
|
||||
console.error(error); // .toString()?
|
||||
if (error.message && !error.message.contains('Target closed')) // e.g. when killed by Ctrl-C
|
||||
notify(`epic-games failed: ${error.message}`);
|
||||
if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C
|
||||
notify(`epic-games failed: ${error.message.split('\n')[0]}`);
|
||||
} finally {
|
||||
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?
|
||||
|
|
|
|||
4
gog.js
4
gog.js
|
|
@ -122,8 +122,8 @@ try {
|
|||
}
|
||||
} catch (error) {
|
||||
console.error(error); // .toString()?
|
||||
if (!error.message.contains('Target closed')) // e.g. when killed by Ctrl-C
|
||||
notify(`prime-gaming failed: ${error.message}`);
|
||||
if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C
|
||||
notify(`gog failed: ${error.message.split('\n')[0]}`);
|
||||
} finally {
|
||||
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?
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@ try {
|
|||
await page.locator(games_sel).screenshot({ path: p });
|
||||
} catch (error) {
|
||||
console.error(error); // .toString()?
|
||||
if (error.message && !error.message.contains('Target closed')) // e.g. when killed by Ctrl-C
|
||||
notify(`prime-gaming failed: ${error.message}`);
|
||||
if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C
|
||||
notify(`prime-gaming failed: ${error.message.split('\n')[0]}`);
|
||||
} finally {
|
||||
await db.write(); // write out json db
|
||||
if (notify_games.length) { // list should only include claimed games
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue