When I submit multiple purchase orders one after another, I see get an error saying “A purchase order with po_id 5 [or another number] already exists”. I am single-threading my calls and waiting for each to complete, so I don’t believe it’s a concurrency issue. My script runs fine when I submit one PO at a time. Is there anything that could be causing this?
My request body uses a unique value for po_number and does not include a po_id.
Hi @waltlawsmacd-gloss, Welcome!
To dig into the details a little deeper, please send a request-id of one of these mutations where you received the error. Thank you so much for your attention!
The information that is sent for each of these requests looks to be successful. I am not seeing any errors, and the successful PO creation. Are the request-ids that you sent for the creation of more than one PO at a time? That is not what I am seeing in the call. Is the problem when you are sending one right after another? If so, can you send times with the request-ids and I can check the logs for errors. That may give some more insight.
The issue appears to be with requests coming one-after-another. The request_id I shared was for one PO and failed directly after a different request_id created a different PO. I retried the request and succeeded, but it appears that these requests fail when they are strung together.
Any luck with solving this/figuring out a workaround? While we can retry them, I would hope that there should be some sort of a more permanent solution.