Skip to content

Commit 7643551

Browse files
authored
Fix catch error while file not able download (#737)
1 parent d853a18 commit 7643551

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/telegram.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,9 @@ class TelegramBot extends EventEmitter {
15871587
return resolve(filePath);
15881588
});
15891589
});
1590+
fileStream.on('error', (err) => {
1591+
reject(err);
1592+
});
15901593
return promise;
15911594
}
15921595

0 commit comments

Comments
 (0)