Exception Handling and Error Codes

This feature propagates and records error codes for recoverable and non-recoverable Enterprise Information System (EIS) errors, to allow mobile applications to better handle and recover from errors between the EIS and Sybase Unwired Platform, and to improve the usability of error messages received by users of physical devices. When implementing custom error checking, the error code and message can be influenced in the result checker by throwing a DSException.

The Unwired Server generates log records and propagates them back to the client. During deployment a LogRecord class is generated for each package, and a CDB table is generated per package for storing log records. This table gets downloaded to mobile synchronization clients.

When an error occurs during a mobile client synchronization request, a LogRecord is created by Unwired Server and stored in the CDB. During package synchronization, the LogRecord table is synchronized to the mobile client.

Mobile applications handle errors in a callback handler, or display a message to mobile users. Error handling is enhanced because the LogRecord contains both the EIS error code (the 'eisCode') and the logical HTTP error code mapped to that EIS error code (the 'code'). The following logical HTTP error codes are defined for EIS errors:

Recoverable Error Codes
Error Code Probable Cause
409 Backend EIS is deadlocked.
503 Backend EIS down or the connection is terminated.
Non-recoverable Error Codes
Error Code Probable Cause Manual Recovery Action
401 Backend EIS credentials wrong. Change the connection information, or backend user password.
403 User authorization failed on Unwired Server due to role constraints (applicable only for MBS). N/A
404 Resource (table/webservice/BAPI) not found on Backend EIS. Restore the EIS configuration.
405 Invalid license for the client (applicable only for MBS). N/A
412 Backend EIS threw a constraint exception. Delete the conflicting entry in the EIS.
500 SUP internal error in modifying the CDB cache. N/A

When an operation submitted from an Workflow Application returns an error, Unwired Server inspects the error code. If that code is one of a predefined set of recoverable error codes, the workflow queue is blocked due to the error. It is retried automatically at a configurable interval or need to be restarted manually. JSON is implementation detail in this context.

Documented in: