Is there a recommended approach to getting notified if a configured Rule or Action starts to have issues?
Though Auth0 does not have a firm recommendation on how to monitor the Rules or Actions pipeline, there are a couple of options that could be considered. NOTE: The following list is not exhaustive, and other solutions may exist depending on the use case and business needs.
- Create a Log Stream to send Auth0-related events to a logging provider. A potential solution could be to only send ‘failed login’ logs to this provider, which would be the log event most likely to include any error messages related to a Rule or Action failing
- If the goal is to send data to a third party service without using log streams, it is possible to wrap a given Rule or Action in a try/catch block. Within the catch block, it would then be possible to make an API call to the third party service with whatever error details are necessary.
Though not specifically related to the above two options, Auth0’s documentation on error handling best practices may also be useful when building out this solution.