if (message.indexOf("Unable to determine package for") != -1) {
exception = new ResourceNotFoundException(message, exception);
} else if (message.indexOf("currently an active transaction") != -1) {
exception = new IllegalStateException(message, exception);
} else if (message.indexOf("SoftLayer_Exception_Order_Item_Duplicate") != -1) {
exception = new SoftLayerOrderItemDuplicateException(command, response, message);
}
}
}
} finally {
Closeables2.closeQuietly(response.getPayload());