uiowa-cs-5800-0001-fall-2018 / blocklybot

http://blockbot.io
0 stars 1 forks source link

Chatbot: Twillio reports a 502 error on attempt to message the bot #16

Open agurtovoy opened 5 years ago

agurtovoy commented 5 years ago
screen shot 2018-12-05 at 7 53 00 pm
agurtovoy commented 5 years ago

Without an example project it's unclear to me how to build a fully functional bot.

hwaldstein commented 5 years ago

I looked in the source code of your function. The actual error was an extra newline that was making the lambda runtime throw an error. I removed the code that caused the offending newline.

agurtovoy commented 5 years ago

I somehow managed to crash it again:

screen shot 2018-12-06 at 9 21 58 pm
hwaldstein commented 5 years ago

The message created by blockly contains \n newlines. Instead of leaving these characters as \n newlines in the file, they're being interpreted as literal newlines that are being placed in the template. Throwing random newlines into a javascript file is what is causing the error. I've replacing the newlines with commas.

hwaldstein commented 5 years ago

The version that uses commas instead of newlines has been deployed. Please re-test.

hwaldstein commented 5 years ago

For context, this was a different but related issue from the other day.