Skip to content

Commit

Permalink
Fix catch error while file not able download (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraigo authored May 12, 2020
1 parent d853a18 commit 7643551
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,9 @@ class TelegramBot extends EventEmitter {
return resolve(filePath);
});
});
fileStream.on('error', (err) => {
reject(err);
});
return promise;
}

Expand Down

0 comments on commit 7643551

Please sign in to comment.