Giter VIP home page Giter VIP logo

Comments (11)

derhuerst avatar derhuerst commented on September 28, 2024

That's Telegrams fault afaik.

from node-telegram-bot.

vbauer avatar vbauer commented on September 28, 2024

Probably, but is it possible to wrap this exception? In the current moment my bot suddenly breaks.

from node-telegram-bot.

derhuerst avatar derhuerst commented on September 28, 2024

Why would you wrap that error? I think it is your responsibility you properly handle that error.

from node-telegram-bot.

vbauer avatar vbauer commented on September 28, 2024

I mean this error occurs in the part of node-telegram-bot library. Is it possible to handle somehow this exception in my code?

from node-telegram-bot.

derhuerst avatar derhuerst commented on September 28, 2024

How do you receive the error?

from node-telegram-bot.

vbauer avatar vbauer commented on September 28, 2024

You can see full stacktrace in the description. That's all I have..

from node-telegram-bot.

derhuerst avatar derhuerst commented on September 28, 2024

Did you get it in a callback or has it been thrown somewhere else?

from node-telegram-bot.

vbauer avatar vbauer commented on September 28, 2024

If I have got this information, I could catch this error and add some logging, but I do not know how to understand it using this stacktrace.

I see that error occurs somewhere in poll method inside pollingRequest: https://github.com/depoio/node-telegram-bot/blob/master/lib/Bot.js#L273

from node-telegram-bot.

derhuerst avatar derhuerst commented on September 28, 2024

Do something like bot.on('error', (err) => {/* handle error here */).

from node-telegram-bot.

vbauer avatar vbauer commented on September 28, 2024

Thank you for suggestion, I will try it as soon as possible!

from node-telegram-bot.

vbauer avatar vbauer commented on September 28, 2024

Hmm.. I've just checked source and I already have the following code (but bot was stopped anyway).

bot.on('error', function (error) {
    log(error);
});

Perhaps the problem was caused by OpenShift. Thank you for your time! I will reopen this ticket, if find something interesting.

from node-telegram-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.