'409 Conflict Response When Creating Shopify Transaction using shopifyapi v7.0

I am using Python's shopifyapi v7.0 package to interact with the Shopify APIs, when trying to create a void transaction in Shopify I get an error code of 409 with the msg of Conflict, and that is it no other information provided.

this is the code snippet that fails:

tx = shopify.Transaction.create({"kind": "void", "order_id": order.id})

when catching and printing the error I get:

error:Response(code=409, body="b''", headers={...}, msg="Conflict")

have anyone face this issue before or a similar issue, any help would be deeply appreciated

Please note that the error reproducing is so inconsistent, meaning sometimes its working fine without trowing any error



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source