Updating Parser Plug-ins for Import Error Codes
This procedure provides a generic approach for updating your Financial Institution Parser Plug-in to use standardized import error codes when raising exceptions. Implement this update to ensure that import failure reporting in NetSuite is actionable and consistent.
To update your parser plug-in to use standardized error codes for import-level errors:
-
Identify all import-level exception cases.
Review your plug-in's
parseDatafunction and any code that handles overall import failures. Examine all existing error handling inparseData(including allthrow,catch, or error-handling statements) that could halt the entire import process (for example, file format errors, connectivity issues, or inactive required plug-ins). -
Map each error to a standardized import error code.
For each import-level failure you identify, map it to the corresponding standardized error code listed in Bank Import Error Codes (Reference). Double-check all branches of your error handling, including rarely encountered or edge case errors from your banking APIs. This will ensure that every import-level error scenario is mapped to a standardized error code.
-
Update your exception-handling logic.
Replace any legacy exception that used a custom error name or free-text message with the standardized approach.
Note:The provided code samples are examples and should be adapted to your plug-in implementation.
Legacy approach (before standardization):
throw error.create({ name: 'MY_IMPORT_ERROR', message: 'Custom failure reason' });Standardized approach (required for standardized error codes):
parseData: function (context) { try { // Import parsing logic } catch (e) { throw error.create({ name: 'BANK_IMPORT_STANDARD_ERROR', message: '0000000000'// Use the code that matches the specific failure scenario }); } }Set the
nameproperty to 'BANK_IMPORT_STANDARD_ERROR'.Set the
descriptionproperty to the standardized error code that corresponds to the failure scenario. For a list of error codes and scenarios, see Bank Import Error Codes (Reference).
Additional Guidance
For additional guidance, do the following:
-
Test your plug-in to simulate various import-level errors and confirm that the UI displays the expected standardized error codes and messages. For more information, see Testing a Financial Institution Parser Plug-in.
-
For information about updating connectivity plug-ins to use standardized error codes for import-level errors, see Updating Connectivity Plug-ins for Import Error Codes.
-
For details about updating parser plug-ins for parser-level error codes, see Updating Parser Plug-ins for Parser Error Codes.
-
For details about receiving account-level errors, see Updating Connectivity Plug-ins for Account Error Codes.
For more information about import error codes or mapping scenarios, see Bank Import Error Codes (Reference). If you need assistance, contact NetSuite Support.
Related Topics
- Administering a Financial Institution Parser Plug-in
- Error Handling for Financial Institution Parser Plug-ins
- Updating Parser Plug-ins for Parser Error Codes
- Updating Connectivity Plug-ins for Import Error Codes
- Updating Connectivity Plug-ins for Account Error Codes
- Financial Institution Parser Plug-in Interface Definition