Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid character '<' looking for beginning of value #11

Open
automaciej opened this issue Dec 9, 2017 · 0 comments
Open

invalid character '<' looking for beginning of value #11

automaciej opened this issue Dec 9, 2017 · 0 comments

Comments

@automaciej
Copy link

automaciej commented Dec 9, 2017

When I leave my bot (based on the boilerplate of the example echo bot) on e.g. overnight, it goes like this:

2017/12/06 02:21:54 api.go:38: response map[data:<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>
]
2017/12/06 02:21:54 langbot.go:74: invalid character '<' looking for beginning of value

The main bot loop is:

        err = bot.Serve(netCtx)                                                                         
        if err != nil {                                                                                 
                log.Fatal(err)                                                                          
        }

I guess my bot could ignore this error, and enter the loop again. But is it the way it's supposed to work? If it couldn't access Telegram, it would continue crashlooping forever.

P.S. I mistakenly submitted this earlier to go-telegram-bot-api/telegram-bot-api#118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant