question

yogesh-srivastava avatar image
yogesh-srivastava asked yogesh-srivastava commented

Cannot delete LineItem from Order list using cloverSDK

Hi,
I have used deleteLineItems() method of Class OrderConnector to delete added line item of order, most of case it's working fine but some time it's give error, while I have passed same parameter each and every time. If any body have an idea please share thanks. Below is my code and also exception what ever thrown by this.

BaseApplicationContext.orderConnector.deleteLineItems(OrderId, lineItemId);

Exception is :

com.clover.sdk.v1.ClientException 02-07 19:03:45.301 8459-9572/com.table.tablemanagement W/System.err: at com.clover.sdk.v1.ServiceConnector.throwOnFailure(ServiceConnector.java:277) 02-07 19:03:45.301 8459-9572/com.table.tablemanagement W/System.err: at com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:210) 02-07 19:03:45.301 8459-9572/com.table.tablemanagement W/System.err: at com.clover.sdk.v3.order.OrderConnector.deleteLineItems(OrderConnector.java:288) 02-07 19:03:45.301 8459-9572/com.table.tablemanagement W/System.err: at com.table.fragment.OrderDetailsFragment.doInBackground(OrderDetailsFragment.java:235) 02-07 19:03:45.301 8459-9572/com.table.tablemanagement W/System.err: at com.table.framework.GenericAsyncTask.doInBackground(GenericAsyncTask.java:30) 02-07 19:03:45.311 8459-9572/com.table.tablemanagement W/System.err: at com.table.framework.GenericAsyncTask.doInBackground(GenericAsyncTask.java:13) 02-07 19:03:45.311 8459-9572/com.table.tablemanagement W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288) 02-07 19:03:45.311 8459-9572/com.table.tablemanagement W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 02-07 19:03:45.311 8459-9572/com.table.tablemanagement W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 02-07 19:03:45.321 8459-9572/com.table.tablemanagement W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 02-07 19:03:45.321 8459-9572/com.table.tablemanagement W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 02-07 19:03:45.321 8459-9572/com.table.tablemanagement W/System.err: at java.lang.Thread.run(Thread.java:841) 02-07 19:03:45.341 8459-8459/com.table.tablemanagement V/Rajesh: postExecute... opType = RemoveItem

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anthonypinto avatar image anthonypinto commented ·

When you see this error does the method also fail? or does it successfully remove the lineItem? Have you noticed any other pattern to the lineItems being deleted when this error occurs?

0 Likes 0 ·
yogesh-srivastava avatar image yogesh-srivastava commented ·

Thanks for response. when we delete lineitem from orderlist, I observe that some time lineitem deleted successfully but some time method call got failed and also lineitem was not deleting.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community