Similar to how you log messages with node.js you can use console.log and console.error with the code actions to do so.

The errors appear in the notification bar and within the code editor’s log view.

You can solve these errors and ensure that the bot functions correctly.

Below is the code snippet to fetch the errors.

// User shares an image
console.log('View params', payload.params)
// Something bad
console.error('This is not good', err)