Discussing APIs and development related to customers, discounts, and order management.
Hi,
We are having an issue where we are posting to the order create end point for a given shop but we receive a 502 response back and are unable to get the order that was actually created. This is a high priority item as we need to be able to associate created orders in Shopify within our system
GuzzleHttp\Exception\ServerException · Server error: `POST https://REDACTED_SHOP_NAME.myshopify.com/admin/api/2020-04/orders.json` resulted in a `502 Bad Gateway` response: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="referrer" content="never" /> <m (truncated...)
We received the 502 response 6 times for creating this particular order, once we looked at the orders list from within Shopify using the customer email we see 4 orders when we only expected 1. We would expect receiving any 500 error would not result in the order actually being created.
Thanks,
Patrick
Hey @Preddy - would you be able to provide me with an example x-request-id header that is being returned with this 5XX server response, timeframe of what it started, as well as an example of the RAW request body being passed when you get this error? With that, I would be happy to take a closer look, pass on any insights or suggestions moving forward!
- Cheer!
awwdam | API 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
Unfortunately we do not currently track this data but will be implementing it soon to make things like this easier! Would I be able to provide you an order id and hopefully the payload and timeline of the calls suffice?
Thanks!
Hey @Preddy,
Thanks for getting back to me - for troubleshooting purposes, implementing this type of logging can be incredibly helpful.
At this time, our team is unable to offer authenticated support through these Community forums, which means we can't locate a store or partner account. When it comes to API related questions about functionality like this, we will need a recent x-request-id header to dig deeper - though an example request body, return payloads, and server errors are also helpful. Moving forward, if you can locate an example x-request-id from a response with the error mentioned, please feel free to pass it on in a reply here!
If you feel this is an API bug or functionality issue related to a specific store, I would definitely suggest reaching out to Shopify Support directly. From there, someone can take a closer look once authenticated.
- Cheers!
awwdam | API 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