Since about a week ago all my agents are sending a second duplicate request to my webhook (which is a GC HTTP Function) within milliseconds of sending the 1st request and thus making my webhook process the request twice. These duplicates even share the same responseId.
I'm aware that Dialogflow ES agents wait up to 5 seconds for the webhook to response or it will throw a time out error. However to my knowledge it did not re-send the request on a timeout error:
"webhookStatus": {
"code": 4,
"message": "Webhook call failed. Error: DEADLINE_EXCEEDED, State: URL_TIMEOUT, Reason: TIMEOUT_WEB."
}
I tried using cache (npm node-cache) to check if the responseId has already been processed but it didn't work because the duplicate request is sent before I'm actually able to finish processing the first one so the responseId is not cached.
Is anyone else experiencing this? If so, how are you handling the duplicate requests? Are there any settings that may be causing this that I'm missing?