base - Internal error 422 on Order Create Endpoint

Nolan_Miller
New Member
3 0 0

Our application has this endpoint setup correct and it is working 99% of the time.  On some occasions, the API responds with a 422 error and the following message "Response code 422 (Unprocessable Entity)".  This is the error data in the response body.  

{ "base" : "Internal error" }

 

Nothing too helpful there. 

We are already catching out of stock errors by finding the "line_items" key, but this is not present in these errors. 

I'm at a loss to why these errors are occurring.  I am unable to reproduce in my test environment because this is so sporadic.  Has anyone seen this error before?

I reached out to the Shopify "Plus" Live chat and they would not offer any help.  They suggested to post in the forums so here I am.

0 Likes
Nolan_Miller
New Member
3 0 0

I was able to reproduce this issue with some trial and error.  I discovered that when using the create order endpoint, Shopify will update the customer's address to the shipping address provided on the order.  We are sending off multiple order create requests at the same time and if this address is different, the second request will fail with a 422.  I assume this is some race condition or error in Shopify's API.

0 Likes
CalD
Shopify Staff
Shopify Staff
90 8 12

Hi @Nolan_Miller ,

If you can reproduce again, can you provide the X-Request-Id from the response headers so we can try to troubleshoot further?

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
Nolan_Miller
New Member
3 0 0

@CalD 
I have a request id from one of the previous occurrences.  It is 8a52402d-927f-4445-bdcd-b739e7c82fd2.  Thank you.

0 Likes

Same issue here... 

0 Likes