Closed kseniyaleutseyeva closed 3 years ago
This happens because the 202
response status code is handled differently (see https://github.com/MONEI/Shopify-api-node/issues/261 and https://github.com/MONEI/Shopify-api-node/pull/298 for the motivations), but it seems no Location
header is returned for ResourceFeedback
and instead the resource is created immediately.
I think Shopify is using the wrong status code in this case. It should be 201
and not 202
but it seems consistent with the documentation.
I'm not sure how to fix this. I can only think about creating a special case for ResourceFeedback
or adding an option to make polling for 202
responses optional.
Thank you for the explanation. I tried reaching out to Shopify support to receive some comments on this topic but to no avail.
As another possible solution: check if the required headers are present in the reply and skip polling if they are missing.
check if the required headers are present in the reply and skip polling if they are missing
Yes this is good idea.
Thanks, for the fix @lpinca I just hit this and was very confused by Shopify's handling in this case!
Hi,
I have issues when trying to create a ResourceFeedback. A request like this:
always throws this error:
Stack trace:
Kind regards