Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webhook call failed: URL_REJECTED error in DialogFlow v2 Fulfillments

Error description

Upon calling DialogFlow v2 detectIntent API, we randomly get an internal error with status code 13:

Webhook call failed. Fetch failure with no HTTP status code. Status: State: URL_REJECTED Reason: 67

This error seems to happen randomly. The same request can succeed or fail. Interesting point, the service has been deteriorating since Friday 23th August 2019, to fail on almost every call today.

Our investigation

We didn't find anything at all about URL_REJECTED with DialogFlow or Google on internet.

But we found the meaning of the status code 13 on this page:

Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors.

We also checked that we aren't banning Google IP, our that our load-balancing is not messed up (we thought of that since it would make sense with random fails).

The webhook is up and running, and we can call it ourselves. The problem seems to happen in Google's infra, as the error code 13 seems to show.

like image 489
Drestin Avatar asked Aug 27 '19 09:08

Drestin


1 Answers

(I answer immediatly because we fixed it before posting the question. But I posted nevertheless because it may be useful for others)

The problem was that the webhook was called using http. Setting https solved the problem.

It seems that Google activated a webhook policy of rejecting unsecure calls in their servers. It may have been deployed gradually on their cluster, which would explain the gradual degradation.

We know that we should have migrated to https a long time ago, but still we didn't find any mention of the application of this policy on the net.

like image 178
Drestin Avatar answered Nov 28 '22 06:11

Drestin