Issue in handling errors of post requests
There seems to be a bug in the error handling of the POST requests that are being made for the various intents.There are two kinds of errors that need to be handled:
- error object that gets populated when the response object isn't populated.
- response object is populated but with a status code other than 200(success)
So, when error of type 2 occurs the following error messages are generated in the actions error section and google cloud functions console respectively:
This error log points to Line no. 41 of utils.js which is as follows :
if (error.toLowerCase().startsWith("unable")) { // Line 41
// more code follows
In case of error of type 2, as the error object doesn't get populated and is null
, the above error log is generated. So, we need to add an error response for actions when error is null
and statusCode is 400
.
Edited by Siwani Agrawal