Skip to content

Commit e8fc159

Browse files
author
Zakaria RACHEDI
committed
Unable to relauch app from codenow, come-back to old error catching way
1 parent 7dd161d commit e8fc159

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/resume-crawler/resume.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ var switchErrorHandler = exports.switchErrorHandler = function (errorMsg, catego
1818
case 'ETIMEDOUT':
1919
console.log('\x1b[31m%s\x1b[0m' ,'\n /!\\ Error ETIMEDOUT detected ! Your connexion took too much time to respond.');
2020
saveData(category, items, resume, game);
21-
console.log('\x1b[31m%s\x1b[0m' ,'\n /!\\ App will retry in 30s');
22-
wait(30000);
21+
console.log('\x1b[33m%s\x1b[0m' ,'/!\\However, don\'t worry: if your relaunch it, the app will resume the parsing from last item parsed ;)');
22+
wait(4000);
23+
process.exit();
2324
break;
2425
case 'Error: read ECONNRESET':
2526
console.log('\x1b[31m%s\x1b[0m' ,'\n /!\\ Error ECONNRESET detected ! Connexion shutdown or reset, verify your internet connexion !');
2627
saveData(category, items, resume, game);
27-
console.log('\x1b[31m%s\x1b[0m' ,'\n /!\\ App will retry in 30s');
28-
wait(30000);
28+
console.log('\x1b[33m%s\x1b[0m' ,'/!\\However, don\'t worry: if your relaunch it, the app will resume the parsing from last item parsed ;)');
29+
wait(4000);
30+
process.exit();
2931
break;
3032
case 'Error: unable to verify the first certificate':
3133
console.log('\x1b[31m%s\x1b[0m' ,'\n /!\\ Error ECONNABORTED detected ! Connexion shutdown, verify your internet connexion !');

0 commit comments

Comments
 (0)