-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
TypeError: Cannot read property 'statusCode' of undefined #281
Labels
Comments
Almost the same here:
Linux 3.14.79 armv7l GNU/Linux |
GochoMugo
added a commit
that referenced
this issue
Feb 8, 2017
Bug: On certain errors, during polling, cause the following error to be thrown: TypeError: Cannot read property 'statusCode' of undefined This is caused when we try to access the 'response' property on the error object in the error handler (`catch(error)`). It goes missing when the error was fatal, for example, network error, thus no server response available. References: * Issue #281: #281 * Reported-by: @dimawebmaker
Just pushed a fix for this in commit 7e4cadb514346f1fc7262fb445363b9ab9beeec2. Please try it out and let us know of the results. |
GochoMugo
added a commit
that referenced
this issue
Feb 10, 2017
Added: 1. Add constructor options: * (#243) `options.polling.params` (by @GochoMugo, requested-by @sidelux) 1. Add methods: * (#74) *TelegramBot#removeReplyListener()* (by @githugger) 1. (#283) Add proper error handling (by @GochoMugo) 1. (#272) Add health-check endpoint (by @mironov) * `options.webHook.healthEndpoint` 1. (#152) Add test for TelegramBot#sendDocument() using 'fileOpts' param (by @evolun) 1. Document `options.webHook.host` (by @GochoMugo) 1. (#264) Add Bot API version to README (by @kamikazechaser) 1. Add examples: - (#271) WebHook on Heroku (by @TheBeastOfCaerbannog) - (#274) WebHook on Zeit Now (by @ferrari) Changed: 1. (#147) Use *String#indexOf()*, instead of *RegExp#test()*, to find token in webhook request (by @AVVS) Fixed: * Fix bug: - (#275, #280) fix es6 syntax error on Node.js v4.x (by @CrazyAbdul) - (#276) promise.warning from `request-promise` (by @GochoMugo, reported-by @preco21) - (#281) fix handling error during polling (by @GochoMugo, reported-by @dimawebmaker) - (#284) fix error during deletion of already-set webhook, during polling (by @GochoMugo, reported-by @dcparga) 1. Fix links in documentation (by @Ni2c2k)
Fixed in v0.27.0. Thanks @dimawebmaker and @the-AjK for your time and effort in fixing this bug. |
This was referenced Feb 16, 2017
N-Agency-member
pushed a commit
to N-Agency-member/TelegramBot-API-Node.js-
that referenced
this issue
Sep 3, 2024
Bug: On certain errors, during polling, cause the following error to be thrown: TypeError: Cannot read property 'statusCode' of undefined This is caused when we try to access the 'response' property on the error object in the error handler (`catch(error)`). It goes missing when the error was fatal, for example, network error, thus no server response available. References: * Issue #281: yagop/node-telegram-bot-api#281 * Reported-by: @dimawebmaker
passion-27
added a commit
to passion-27/node-telegram-bot
that referenced
this issue
Oct 2, 2024
Bug: On certain errors, during polling, cause the following error to be thrown: TypeError: Cannot read property 'statusCode' of undefined This is caused when we try to access the 'response' property on the error object in the error handler (`catch(error)`). It goes missing when the error was fatal, for example, network error, thus no server response available. References: * Issue #281: yagop/node-telegram-bot-api#281 * Reported-by: @dimawebmaker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have read:
I am using the latest version of the library.
Expected Behavior
Im trying that bot working 24/7 and not show not expected errors.
Actual Behavior
Steps to reproduce the Behavior
Windows 10 - 64bit - if it important.
package.json:
The text was updated successfully, but these errors were encountered: