mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-06 08:36:02 +08:00
fix: unhandled rejection case
This commit is contained in:
parent
0b93e7da53
commit
05df989202
@ -886,6 +886,7 @@ export class PuppeteerControl extends AsyncService {
|
||||
}
|
||||
|
||||
let nextSnapshotDeferred = Defer();
|
||||
nextSnapshotDeferred.promise.catch(()=> 'just dont crash anything');
|
||||
const crippleListener = () => nextSnapshotDeferred.reject(new ServiceCrashedError({ message: `Browser crashed, try again` }));
|
||||
this.once('crippled', crippleListener);
|
||||
nextSnapshotDeferred.promise.finally(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user