The 'originalRequest' object contains data send from Actions on Google
to Dialogflow. It is not present when the fulfillment is invoked via
Dialogflows web UI directly, thus raising a KeyError. This adds an
additional check for the presence of that object.
The 'originalRequest' object contains data send from Actions on Google to Dialogflow. It is not present when the fulfillment is invoked via Dialogflows web UI directly, thus raising a KeyError. This adds an additional check for the presence of that object.
Note that according to the documentation the 'data' and 'user' objects can never raise KeyErrors as they are always present in the 'originalRequest' object (https://developers.google.com/actions/dialogflow/webhook).