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.: Sample Use Cases: Rules with Authorization, 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?