Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

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

Open
agurtovoy opened this issue Dec 6, 2018 · 6 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@agurtovoy
Copy link
Member

screen shot 2018-12-05 at 7 53 00 pm

@agurtovoy agurtovoy self-assigned this Dec 6, 2018
@agurtovoy agurtovoy added the bug Something isn't working label Dec 6, 2018
@agurtovoy
Copy link
Member Author

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

@hwaldstein
Copy link
Collaborator

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
Copy link
Member Author

I somehow managed to crash it again:
screen shot 2018-12-06 at 9 21 58 pm

@hwaldstein
Copy link
Collaborator

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
Copy link
Collaborator

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

@hwaldstein
Copy link
Collaborator

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants