Skip to main content

Last updated: 2024-06-07


Error Handling


In this topic:


Overview


This topic describes errors you may encounter when sending requests to SmartIntegrator.


Status Element


The _status element at the end of an XML response indicates whether SmartIntegrator encountered an error processing a request.


  • A status of OK means no error occurred.
  • A status of error means at least one error occurred. Information about the error is included in the error element in the response.

Error Element


The error element in a response XML contains the error code and description. Here is an example of an invalid search operation request:


XML
<request version="1.0">
  <header>
    <office/>
    <user/>
    <password/>
    <keepsession>true</keepsession>
  </header>
  <search total="true" pagesize="3">
    <object>
      <Contact>
        <LastName/>
        <FirstName/>
      </Contact1>
    </object>
    <condition>
      <expr prop='LastName' op='starts'>
        <v>A</v>
      </expr>
    </condition>
  </search>
</request>

The typo in the closing tag for the Contact element generates the following error response:


XML
<response version="1.0">
  <header>
    <sessionClosed/>
  </header>
  <error code="1001">Invalid XML format. The end-tag for element type "Contact" must end with a '>' delimiter.</error>
</response>

Clients must parse the entire response to find out if an error occurred.


Error Behavior


There are two types of errors that SmartIntegrator returns:


  • System errors are internal errors caused by existing issues or the environment. When this happens, the stack trace is printed out.
  • Process errors are caused by ill-formed request XML.

Error codes 2001, 2002 and 2003 denote login and session errors. The process is aborted if one of those errors occurs.


Error 1001 is an XML syntax error that also stops processing.


All other errors produce an error element generated inside the element that caused the error, but SmartIntegrator continues to process the rest of the request. All unfinished operations in a transaction element are canceled if an error happens inside the transaction.


The following example shows the different error behavior inside and outside of a transaction. Here is the request:


XML
<request version="1.0">
  <header>...</header>
  <transaction>
    <get>
      <Contact id="Contact.">
        <FullName/>
      </Contact>
    </get>
    <get>
      <Contact id="Contact.65854.3">
        <FullName/>
      </Contact>
    </get>
  </transaction>
  <get>
    <Contact id="Contact.">
      <FullName/>
    </Contact>
  </get>
  <get>
    <Contact id="Contact.65854.3">
      <FullName/>
    </Contact>
  </get>
</request>

The response shows that the error inside the transaction element caused all of the get requests in that transaction to error, while the valid get request that was not part of the transaction was processed:


XML
<response version="1.0">
  <header>...</header>
  <transaction>
    <get>
      <Contact id="Contact." _status="error">
        <error code="3004">Invalid Object Id.</error>
      </Contact>
    </get>
  </transaction>
  <get>
    <Contact id="Contact." _status="error">
      <error code="3004">Invalid Object Id.</error>
    </Contact>
  </get>
  <get>
    <Contact id="Contact.65854.3">
      <FullName>Ackerman, Joseph</FullName>
    </Contact>
  </get>
  <_status>error</_status>
</response>

Error Code List


CodeSymbolMessage
System Errors
1ERROR_SYSTEMInternal error.
2ERROR_ILLEGEL_ARGUMENTIllegal Argument Exception. %1
3ERROR_INVALID_DATA_TYPEInvalid data type %1.
4ERROR_UNSUPPORTED_TYPEUnsupported type %1.
5ERROR_FAILED_TO_CREATE_OBJECTIDFailed to create object ID ( %1 ).
6ERROR_MISMATCH_OBJECTIDObject ID ( %1 ) does not match with object ( %2 ).
XML Errors
1001ERROR_XML_INVALID_FORMATInvalid XML format.
1002ERROR_XML_INVALID_TAG_NAMEInvalid Tag name ( <%1> ).
Login/Session Errors
2001ERROR_INCOMPATIBLE_VERSIONRequest version %2 is not match with Catalog Version %1
2002ERROR_INVALID_LOGIN_INFOLogin failed.
2003ERROR_INVALID_SESSIONInvalid Session ID.
2004ERROR_NO_RIGHT_TO_SWITCH_USERLogin user does not have sufficient rights to impersonate to other users.
2005ERROR_SWITCH_USER_NOT_FOUNDOffice "%1" or user "%2" cannot be found.
2006ERROR_INVALID_OFFICE_INFOInvalid office info.
2007ERROR_INVALID_USER_INFOInvalid user info.
2008ERROR_UNIQUEID_LOGIN_DISABLEDThe UnqiueID Login is disabled, Please check the configuration file.
2009ERROR_NO_RIGHT_TO_SWITCH_OFFICELogin user does not have enough right to impersonate to other offices.
Object Errors
3001ERROR_OBJECT_NOT_EXISTObject is not found ( <%1> ).
3002ERROR_OBJECT_NOT_SEARCHABLEObject is not Searchable ( <%1> ).
3003ERROR_OBJECT_READONLYObject is read-only ( <%1> ).
3004ERROR_OBJECT_IDInvalid Object Id.
3005ERROR_OBJECT_NO_IDObject Id value is null or blank.
Property Errors
4001ERROR_PROPERTY_NOT_EXISTProperty is not found ( <%1> ).
4002ERROR_PROPERTY_NOT_SEARCHABLEProperty is not Searchable ( <%1> ).
4003ERROR_PROPERTY_READONLYProperty is read only ( <%1> ).
4004ERROR_PROPERTY_INVALID_OPTIONInvalid property option ( %1 ).
Keyword Errors
5001ERROR_INVALID_FUNCTIONInvalid function ( %1 ).
5002ERROR_INVALID_OPERATORInvalid operator ( %1 ).
5003ERROR_INVALID_BOOLEANInvalid Boolean value ( %1 ). "true" or "false".
Condition Errors
6001ERROR_COND_PROPERTY_NOT_ALLOWEDProperty is not allowed in search condition ( %1 ).
6002ERROR_COND_DATA_TYPE_NOT_ALLOWEDProperty is not allowed in search condition ( %1 ) due to its data type (%2).
6003ERROR_COND_NOT_EMBEDDEDProperty is not embedded object ( "%1" in "%2" ).
6004ERROR_SEARCH_NO_OBJECTNo object is specified to search.
6005ERROR_EXPR_NO_PROPERTYNo property is specified in expression.
6006ERROR_SEARCH_INVALID_SEARCHIDInvalid search ID ( %1 ).
6007ERROR_COND_OBJECT_NOT_IN_JOINEmbedded object is not include in join ( "%1" ). Maximum depth level of embedded object for search condition is 4. The depth of given property name may exceed the limit.
6008ERROR_OPERATOR_NOT_ALLOWEDOperator ( %1 ) is not allowed for %2 ( %3 ).
6009ERROR_INVALID_LINKIDInvalid Link ID ( %1 ). Target table primary keys cannot be referred by main table's Link ID.
6010ERROR_INSUFFICENT_SEARCH_DATAInsufficient search data.
Method Errors
7001ERROR_METHOD_NOT_EXISTMethod is not found ( %1 ).
7002ERROR_METHOD_INVOKEInvoke method %1 failed.
Sync Errors
8001ERROR_RMA_NOT_EXISTRMA is not found ( %1 ).
8002ERROR_IMPROPER_RETURN_OBJECTImproper return object.
Data Access Errors
10001ERROR_DATA_ACCESS_DENIEDThe user does not have permission to access this module. Please contact an office administrator for further assistance.