Error codes and error messages

When an error or exception occurs in IBM Sterling Fulfillment Optimizer with Watson, the exception contains the error code, error code message, and reason for the exception.

When a call is made from a user exit to Fulfillment Optimizer, if an exception occurs in the Fulfillment Optimizer runtime adapter, a OTMZWebClientException exception occurs.

If an exception occurs in Fulfillment Optimizer, a OTMZOPTE exception occurs.

Error code categories

Table 1. Error code categories
Error Codes Description
OTMZGNE General application error codes.
OTMZOPTE Fulfillment Optimizer error codes.
OTMZRNE Rank API errors.
OTMZWEB Runtime adapter errors.
WOORE Optimization explainer API errors.

Examples of possible exceptions

Table 2. Possible exceptions
Exception or response Reason
OTMZException
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<errorCode>OTMZOPTE011</errorCode>
<errorCodeMessage>Sku '46448325' exceeds weight limit</errorCodeMessage>
<reason>com.ibm.commerce.inbalance.baseapi.OTMZException: 
Sku 46448325 has weight 200.7 more than 150 lbs.</reason>
</error>
The weight of SKU 46448325 is 200.7 lbs. This amount exceeds the limit of 150 lbs.
When connection timeout occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<errorCode>OTMZWEB003</errorCode>
<errorCodeMessage>Response Timeout</errorCodeMessage>
</error>
The connection timed out. Response timeout from the runtime adapter. The runtime adapter cannot connect to Fulfillment Optimizer.
When the runtime adapter is in sleep mode.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<errorCode>OTMZWEB002</errorCode>
<errorCodeMessage>Sleep Mode</errorCodeMessage>
</error>
The runtime adapter is in sleep mode.
When the Fulfillment Optimizer service is down.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<errorCode>OTMZWEB004</errorCode>
<errorCodeMessage> Service not available</errorCodeMessage>
</error>
The Fulfillment Optimizer service is unavailable. Try again later.

Examples of the response

Example 1: When the Tenant ID value is missing from the otmz.webclient.property file.

OTMZwebClientException.getErrorCode()=OTMZWEB001
OTMZwebClientException.getErrorMessage()=Property not found Exception
OTMZwebClientException.getReason ()= “Tenant ID is missing from otmz.webclient.property file” 

Example 2: When the Fulfillment Optimizer endpoint value is missing from the otmz.webclient.property file.

OTMZwebClientException.getErrorCode()=OTMZWEB001
OTMZwebClientException.getErrorMessage()=Property not found Exception
OTMZwebClientException.getReason ()= “Optimizer endpoint is missing from otmz.webclient.property file”

Example 3: When the otmz.webclient.property file is missing or is not loaded

OTMZwebClientException.getErrorCode()=OTMZWEB005
OTMZwebClientException.getErrorMessage()=File not found
OTMZwebClientException.getReason ()= “Unable to find otmz.webclient.property file”