-
Notifications
You must be signed in to change notification settings - Fork 82
uninitialized constant TelegramBot::ApiResponse::ResponseError #44
Comments
Hmmm... This sucks, I'll try to take a look tonight. |
@Schwad wanna take this over? |
thank you. To reproduce it, just pass a wrong key to the bot. |
I think we might have forgotten to require https://github.com/eljojo/telegram_bot/blob/master/lib/telegram_bot/response_error.rb If you wanna give it a shot it shouldn't be a hard PR to open. |
Here's my replication, actually getting the telegram bot response error:
With result of:
Which seems to me it is behaving as expected. Maybe we need more information. This was tried against |
Hi @Schwad, you are right, running your reproducer, I get the same error as before. note: ruby 2.5.0 from rvm.
|
This comes to mind but I think it's a red-herring. I think the key is that it's trying to look for telegram_bot/lib/telegram_bot/api_response.rb Lines 13 to 14 in b545496
|
Maybe I acted stupid, but I put the ResponseError class in ApiResponse class, and the problem was solved. |
@edikbekir I don't think that was stupid. I really wish to understand what's making this fail, though. If someone wants to open-up a PR that fixes the problem I'd be happy to merge it, moving |
@eljojo @edikbekir I've created PR to fix issue #45 |
@eljojo since I didn't get the failure I'm gonna try this same again today with 2.5.1. |
This is my response on
|
Completely full stack:
|
Okay, going a bit creative here. Thought maybe there was a break on original
|
And ran same again against bleeding edge commit
|
@Schwad 404 stands for wrong token I have same in the beginning. Token is not just hash, but id as well. it should look like this |
Ruby: 2.4.4
|
@Schwad it would be unsecure, but maybe you can post out put from https://telegram.me/botfather about your credentials? You can confirm them here https://api.telegram.org/botID_OF_APP:TOKEN/getMe. I think you have now 404 on this url |
@Schwad |
@Schwad sorry. I was thinking that you are trying to make bot working, but you are trying to reproduce issue. I will collect info and post. Please ignore messages above |
I got it! @eljojo , this was replicated using ruby
|
Now that we have the reproduction conditions down we can get to work with fixing it :) |
Okay, here's a thought I have. To break this down a bit I might first to replicate this within each of the main Rails gems (activesupport, activerecord, activemodel, etc.) to see if there's a particular one triggering this problem. After that, I will most likely pull down a rails for to try and find where we're colliding here. |
Any update on this? I am with the same error. |
I solved the problem by adding the ResponseError class inside inside ApiResponse, the PR that was created didn't solve anything for me |
To solve the issue simply add a require "telegram_bot/response_error" in lib\telegram_bot.rb. I would send a pull request, but the published GEM version (0.0.8) is different than the one tagged here with the same number. |
THANK YOU! |
tried to access with
and the traceback looks like:
gem installed:
telegram_bot (0.0.8)
The text was updated successfully, but these errors were encountered: