You can view request and response errors from NetSuite and the Celigo NetSuite framework to debug errors if your account is on EM 2.0. integrator.io only supports NetSuite integrations that use the following protocols:
- RESTlet 1.0
- RESTlet 2.0/SDF
Flow steps
The request and response errors integrator.io displays are determined by the flow steps (import, export, etc.).
Export errors
Use the Actions menu to view the request and response for any export or (dynamic) lookup that returns an error. The details displayed will vary depending on where the export or lookup failed.
Export errors have two classification types:
- Handled/Intended errors - the export process (i.e. validation errors/valid saved search id) or the execution of savedSearch or a permissions-related error.
-
Unhandled/Uncaught/Not in control - infrastructure-related errors (i.e network-timeouts, NetSuite downtime, or NON HTTP 200 response use-case)
- Any fatal errors leading to a search failure during export are denoted by a fatal node in the RESTlet response.
Export examples
The following table displays an example of the request sent and the response that returns when NetSuite fails during the execution of a saved search. In this example, NetSuite received the request, but returned an error during the processing and execution of the saved search.
Request | Response |
---|---|
Shows:
var s = nlapiLoadSearch(‘item’, xxx)
s.setFilterExpression([['isinactive', 'is', 'F'], 'AND', ['subsidiary', 'anyof', ‘4’], 'AND', ['itemid', 'contains', ‘Amazon’])
s.runSearch()
s.getResults()
|
Shows the NetSuite nlapi response. Example:
{
"code":"INVALID_SEARCH",
"details": "That search or mass update does not exist."
}
{
"code": "insufficient_permission",
"message": "Failed to run saved search because Permission Violation: You need the 'Lists -> Items' permission to access this page. Please contact your account administrator.",
}
|
The following table displays an example of the request sent and response that returns when NetSuite fails to process the request from integrator.io because of permission settings errors (not search or export errors).
Request | Response |
---|---|
Shows:
|
Sample response: Example 1
{
code: 'INVALID_ROLE',
message: 'Your role does not give you permission to view this page.'
}
Example 2 {
"code": "JS_EXCEPTION",
"message": Example 3
{
"code": "SSS_INSTRUCTION_COUNT_EXCEEDED",
"message": "Script Execution Instruction Count Exceeded."
}
|
Import errors
Use the Actions menu to view the request and response for any import request that results in an error. The error details will vary depending on where the import failed.
Import errors have two classification types:
- Handled/Intended errors - One or more are returned for each imported record in the request (i.e. import processes like mapping lookup failures, record save errors, record initialization errors.)
- Unhandled/Uncaught/Not in control - infrastructure-related errors (i.e network-timeouts, NetSuite downtime, or NON HTTP 200 response use-case)
- Any fatal errors leading to a search failure during export are denoted by a fatal node in the RESTlet response.
Import examples
The following table displays an example of the request sent and the response returned when NetSuite fails during a lookup or mapping.
Request | Response |
---|---|
Shows:
Sample request: Example 1
{
fieldMapping :
“record type: subsidiary
mapped to field: subsidiary
generated filter expression ["internalid","is","3566003566"]
Lookup filter expression [\"internalid\",\"is\",\"{{{id}}}{{{id}}}\"]\r”,
nlapi :
var s = nlapiCreateSearch( "subsidiary",["internalid","is",3566003566],[ new nlobjSearchColumn(internalid)] )
var rs = s.runSearch().getResults(0, 10)
rs.length: 4
JSON.stringify(rs) : [{}, {}, {}, {}]
“}
Example 2 {
fieldMapping :
“
"Lookup Name SubsidiaryLookupDynamic",
"Lookup key clothing3566",
"Mapped from Field {{[Category Id]}}{{id}}",
"Mapped to Field subsidiary"
”
}
|
Shows:
Sample request: Example 1
{
"source": "mapping",
"code": "VALUE_LOOKUP_FAILED",
"message": "A mapping error occurred. Could not find a match for \"[\"name\",\"is\",\"38\"]\" for the record type \"Subsidiary\"."
}
Example 2
{
"source": "mapping",
"code": "MISSING_STATIC_LOOKUP",
"message": "Could not find mapping in static lookup. { Source: sub} { Key: 38}"
}
|
The following table displays an example of the request sent and the response returned when NetSuite fails while processing nlapi requests submitted by the Celigo NS framework
Request | Response |
---|---|
Shows:
Importing record 0 --- {}
var r = nlapiCreateRecord("customer", {});
r.setFieldValue("isperson", "T");
r.setFieldValue("firstname", "Prasu");
r.setFieldValue("lastname", "Kavali");
r.setFieldValue("phone", null);
r.setFieldValue("mobilephone", null);
r.setFieldValue("email", "prasu@gmail.com");
r.setFieldValue("companyname", "Celigo");
r.selectNewLineItem("addressbook");
sr = r.editCurrentLineItemSubrecord("addressbook", "addressbookaddress");
sr = r.createCurrentLineItemSubrecord("addressbook", "addressbookaddress");
sr.commit();
r.commitLineItem("addressbook");
nlapiSubmitRecord(r, false, false);
|
Shows:
Example
{
"code": "USER_ERROR",
"details": "Please enter value(s) for: First Name, Last Name, Subsidiary",
"name": "USER_ERROR",
"message": "Please enter value(s) for: First Name, Last Name, Subsidiary",
"description": "Please enter value(s) for: First Name, Last Name, Subsidiary"
}
|
The following table displays an example of the request sent and the response returned when NetSuite fails to respond to integrator.io.
Request | Response |
---|---|
Shows:
Example {
"flowId": "*************************",
"_importId": "************************",
"settings": {
"import": {},
"integration": {
"kvSetting1ForIntegration": [],
"txtSetting2ForIntegration": "12"
}
},
"import_da": {...}
},
"_connectionId": "**************************",
"_flowId": "************************",
"_integrationId": "*************************",
"debugMode": true,
"data": [
{
"id": "38",
"Internal Id": "38",
"SKU": "PRI00002",
"Quantity": "19"
}
]
}
|
Show:
{
code: 'INVALID_ROLE',
message: 'Your role does not give you permission to view this page.'
}
Example 2 {
"code": "JS_EXCEPTION",
"message": "INSUFFICIENT_PERMISSION: Permission Violation: You need the 'Transactions -> Sales Order' permission to access this page. Please contact your account administrator."
}
Example 3 {
"code": "SSS_INSTRUCTION_COUNT_EXCEEDED",
"message": "Script Execution Instruction Count Exceeded."
}
|
Comments
Please sign in to leave a comment.