Auth0 Home Blog Docs

List of error types that can be used in a rule?

I wrote a rule that enriches a user profile (by calling our service endpoint).So far i’ve seen using UnauthorizedError as one type of error that’s returned to user through callback. e.g.:, we can do something like:

if (audience === 'http://todoapi2.api' || !audience) {
    return callback(new UnauthorizedError('end_users_not_allowed'));

I wonder if there is a list of all such error types in Node.js in any documentation so I can explore different options. So far I have found Error and UnauthorizedError, but is there an exclusive list?