Message from JavaScript discussions
October 2018
— Ajax / xhr / fetch
fetch('http://example.com/protected/path')
.then(response =>
response.ok
? alert('Access granted')
: alert('Access denied'));
— Thank you very much
— Telegraf/nodejs -> payments. https://gist.github.com/scaccogatto/022c83e7848abb2f02502612a605dc6b everything works fine until I try to make a payment (stripe TEST api). I press "PAY" on telegram UI, some kind of loading starts, then the bot writes: TypeError: Cannot convert undefined or null to object
— Stack?
— Which line?
—
at Function.keys (<anonymous>)
at bot.use (/home/gatto/Projects/momomo/host-bot/src/middlewares/defaultSession.js:12:16)
at execute (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:13)
at Promise.resolve.handler (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:49)
at execute (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:13)
at Promise.resolve.handler (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:49)
at /home/gatto/Projects/momomo/host-bot/node_modules/telegraf-session-redis/lib/session.js:70:16
at execute (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:13)
at Promise.resolve.handler (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:49)
at execute (/home/gatto/Projects/momomo/host-bot/node_modules/telegraf/composer.js:313:13)
— It happens after line 36, everything before that works fine
— Oh I see also
— Failed to process updates. TypeError: Cannot convert undefined or null to object
— With the SAME stack
— I think this actually makes no sense