Error Propagation

You should raise all user-facing error messages using the N/error SuiteScript module. For details on this module, see N/error Module.

In all user-facing errors, you must set the name property to FIPARSER_USER_ERROR. Errors not raised with the FIPARSER_USER_ERROR name property, as well as any exception not handled, are not surfaced to users. Instead, NetSuite displays a generic error message on the Format Profile page. Details about the error are available in the plug-in’s execution log.

The following sample code illustrates how to raise a user-facing error:

          define(['N/error'], function (error) {
    var module = {};
    module.getConfigurationPageUrl = function (context) {
        throw error.create({name: 'FIPARSER_USER_ERROR', message: 'User facing error'});
    }
}); 

        

The following sample code illustrates how to raise an error that is not user-facing:

          throw 'This message will not be displayed on the Format Profile page'; 

        

Related Topics

Administering a Financial Institution Parser Plug-in
Enabling Features for a Financial Institution Parser Plug-in
Adding the Plug-in Implementation

General Notices