Hi,
I’m trying to perform the discountRedeemCodeBulkAdd mutation in a rails application.
I am creating multiple discounts and adding 1000 codes to each in batches of 100. After the majority of the mutations have run I am receiving an error.
I thought this would be a rate limit issue but the error response I received however was as follows.
{"data"=>
{"discountRedeemCodeBulkAdd"=>
{"bulkCreation"=>nil,
"userErrors"=>[{"code"=>nil, "field"=>nil, "message"=>"Something went wrong, please try again."}]}},
"extensions"=>
{"cost"=>
{"requestedQueryCost"=>10,
"actualQueryCost"=>10,
"throttleStatus"=>{"maximumAvailable"=>2000.0, "currentlyAvailable"=>1888, "restoreRate"=>100.0}}}},
@code=200,
The request ID is : “f14338bc-a51d-4d49-9ac7-fed303a603d3”
It seems to be resolved with a 1 second sleep, but I would like to handle this properly if it is indeed a rate issue, however this does not seem possible with the information provided.
Could somebody shine some light on what is causing this error?