question

demskigroup avatar image
demskigroup asked ·

Error: com.clover.sdk.v1.ClientException: status code: 400 Not a valid Clover ID: null

I keep getting this error and I am not sure why. It is coming from this piece of code:


List<Item> res = null;
                try{
                    res = inventoryConnector.getItems();
                } catch (ClientException e) {
                    e.printStackTrace();
                } catch (BindingException e) {
                    e.printStackTrace();
                }


Any reason why?

Inventory
7 comments
10 |2000 characters needed characters left characters exceeded

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

it looks like you may have a line item that doesn't have a clover id. I'm not sure how that would happen. Can you attach a logcat and provide some background on when you started seeing this?

0 Likes 0 · ·
demskigroup avatar image demskigroup David Marginian ♦♦ ·

There's not much in the logcat.

2020-03-16 08:30:11.006 2578-5119/com.servicecharge I/chatty: uid=10110(com.servicecharge) AsyncTask #2 identical 1 line
2020-03-16 08:30:11.081 2578-5119/com.servicecharge I/System.out: Error: com.clover.sdk.v1.ClientException: status code: 400 Not a valid Clover ID: null


0 Likes 0 · ·

It just started happening a few weeks ago to out live merchants. Everything worked beforehand and then I was testing on sandbox to try and identify the problem and saw this error but haven't had much luck.

0 Likes 0 · ·
Show more comments

1 Answer

· Write an Answer
Jacob Abrams avatar image
Jacob Abrams answered ·

The stack trace:

2020-03-16 17:28:01.663 1942-2042/? W/InputValidator: checkCloverIdStrict(InputValidator.java:327): Not a valid Clover ID: null
    java.lang.IllegalArgumentException: Not a valid Clover ID: null
        at com.clover.common.util.InputValidator.checkCloverIdStrict(InputValidator.java:325)
        at com.clover.common.util.InputValidator.cloverIds(InputValidator.java:126)
        at com.clover.engine.inventory.v3.V3InventoryBinder.assignTagsToItem(V3InventoryBinder.java:1550)
        at com.clover.sdk.v3.inventory.IInventoryService$Stub.onTransact(IInventoryService.java:1131)
        at android.os.Binder.execTransact(Binder.java:697)

indicates you are invoking the function:

InventoryConnector#void assignTagsToItem(String itemId, List<String> tags)

and you are passing a list of tags but one or more of the entries in the list of tags is null.

It's unlikely that your call to getItems is the source of the trouble.


Share
10 |2000 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community