The code from the AI is unreliable, since it's an AI making it. I have never had any issues with running things in the Web chat that were caused by Botpress. It is 9/10 times a mistake made by us.
Feel free to create a post in #🤝help and we can debug it