[Question] There was an error sending this message to your bot: HTTP status code GatewayTimeout
Bot Info
- App ID: b5073eb9-0d95-4198-ac1e-53d26ab6b00e
- SDK Platform: .Net
- Active Channels: WebChat
- Deployment Environment: Auzure Bot Service, Azure App Service
Issue Description
I developed a Bot app to upload files to Google Drive using Google API. I registered my Bot and deployed to Azure. When I tried to connect my bot through Webchat channel I am getting error as There was an error sending this message to your bot: HTTP status code GatewayTimeout To be more specific, error is thrown while Bot connecting to Google API. Any help is greatly appreciated. Thank You
@premanayaki This error means there is a problem with your bot code which is preventing it from responding to the conversation.
It sounds like you may be missing some error handling or something. You need to set up a "graceful failure" error handling scenario in your bot code to ensure that, if the Google API request fails or errors out in some other way, your bot can still handle it and respond to the user with some help text or useful error message.
If you need more help, post your code here and we can investigate.
@premanayaki There is a 15 second timeout for message processing. Bots are expected to ack within that time. If the Google API calls are timing out the call, you can start another thread for the processing, acknowledge the call (return status code 200), then proactively send a message to the WebChat user after the long running process has completed.
@EricDahlvang I am getting the same error. After debugging the code I can see the code executing within 3-4 seconds and context.PostAsync("xyz") is not sending the comment to messenger. It is working fine for webchat but not for messenger. Please suggest a solution
@Sandeepmahala Please open a new issue: https://github.com/Microsoft/BotBuilder/issues/new with as much information as you can provide.