Monitor custom errors in actions

Hi everyone!

We have an auth0 action that talks to our backend API. We want to log/record any error that API might return to the auth0 action caller. Currently, we tried to use console.log() in our auth0 action code, but we don’t see any custom logs in auth0 Dashboard Monitoring → Logs.

What is the proper way to tell the auth0 action that there was an internal API error and record it? Should we use Monitoring → Streams for that? Or should we manually send the error to our errors collecting tool, like Sentry, from the auth0 action code?

Thanks!