{"action":"closed","issue":{"url":"https://api.github.com/repos/yagop/node-telegram-bot-api/issues/73","repository_url":"https://api.github.com/repos/yagop/node-telegram-bot-api","labels_url":"https://api.github.com/repos/yagop/node-telegram-bot-api/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/yagop/node-telegram-bot-api/issues/73/comments","events_url":"https://api.github.com/repos/yagop/node-telegram-bot-api/issues/73/events","html_url":"https://github.com/yagop/node-telegram-bot-api/issues/73","id":131097978,"number":73,"title":"Enhancement for bad requests.","user":{"login":"roccomuso","id":6730217,"avatar_url":"https://avatars.githubusercontent.com/u/6730217?v=3","gravatar_id":"","url":"https://api.github.com/users/roccomuso","html_url":"https://github.com/roccomuso","followers_url":"https://api.github.com/users/roccomuso/followers","following_url":"https://api.github.com/users/roccomuso/following{/other_user}","gists_url":"https://api.github.com/users/roccomuso/gists{/gist_id}","starred_url":"https://api.github.com/users/roccomuso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roccomuso/subscriptions","organizations_url":"https://api.github.com/users/roccomuso/orgs","repos_url":"https://api.github.com/users/roccomuso/repos","events_url":"https://api.github.com/users/roccomuso/events{/privacy}","received_events_url":"https://api.github.com/users/roccomuso/received_events","type":"User","site_admin":false},"labels":[{"id":230028961,"url":"https://api.github.com/repos/yagop/node-telegram-bot-api/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-02-03T17:36:37Z","updated_at":"2017-02-11T13:14:43Z","closed_at":"2017-02-11T13:14:43Z","body":"Wouldn't be useful to let the user handle in a different way the bad request on the server?\n\nhttps://github.com/yagop/node-telegram-bot-api/blob/master/src/telegramWebHook.js#L42\n\nWhy this? in production with heroku you can't listen on more than one single port <code>process.env.PORT</code>. And this would be pretty useful if your app should handle also requests from client and not just the telegram webhooks.\n\nMy advice is to expose a new method like <code>bot.onBadRequest(function(req, res) { ... })</code> that let the user handles all the non-matching HTTP requests.\n"}}
{"actor":{"display_login":"GochoMugo"}}