question

demskigroup avatar image
demskigroup asked andrewdzoom commented

orderConnector sometimes null

I have an app that listens for an item being added to an order in the register. Once it is added it sends a popup which if the user selects yes a note get added to the order. This works consistently except sometimes the orderConnector returns null if you add several items in succession. So if I add an item first the orderConnector works fine, then if I increase that item's amount it works again, but if I keep increasing that item's amount at some point the order connector will return null on this line: orderConnector.updateOrder(order);
Orders
6 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.

Mark Mullan avatar image Mark Mullan commented ·

Hi @demskigroup, will you please include a snippet of code to reproduce the behavior you've just described?

Thanks,

Mark

0 Likes 0 ·
andrewdzoom avatar image andrewdzoom Mark Mullan commented ·

Sure, here you: https://pastebin.com/85P8fjzZ

You'll see some nested try statements as I was messing around trying to get it to consistently work.

0 Likes 0 ·
Mark Mullan avatar image Mark Mullan andrewdzoom commented ·

Hi @andrewdzoom, thanks for sharing. Before I even try executing that code... you are invoking orderConnector.updateOrder() but not returning its result. That method returns the Order which you are updating.

Please:

return orderConnector.updateOrder(order);
0 Likes 0 ·
Show more comments

0 Answers

Welcome to the
Clover Developer Community