Logs

A great debugging resource is the ability to view the logs of your function. To do so, refer to the control bar and select the "logs" icon as shown below to view the history of your Function's executions:

In the Function's logs, you can confirm data was successfully posted to Ubidots with the 201 response code:

This is what your function returns. It must be in a JSON dictionary format. In your code, make sure to use return to quit the function and return the dictionary.

return response.data;

This is used to debug purposes, you can print any kind of variables defined before in it or to just print any message that needs to be displayed to the user.

console.log("[INFO] Request result:");
console.log(response);

Last updated