The code sample in the docs seems incomplete.
It says you can create a UserEventError like so:
require(['N/error'], function(error) { function createError() { var errorObj = error.create({ name: 'MY_CODE', message: 'my error details', notifyOff: true }); } createError(); });But this only creates the error object.Is the next step to "throw errorObj;" ??When I do this, the UI returns a SuiteScriptError, not a UserEventError. Am I missing something?