What is the intended handling of resources not being found?
Issue summary
Sometimes ids are assigned to resources that do not yet exist, how should we handle this?
For example, on order_created, the payload includes a customer along with it's id. But if you try to make a request to this id, shopify will respond with a 404 if the customer does not yet exist.
Should we just let the webhooks fail and on one of the subsequent retries the data will be available?
Steps to reproduce
// on order_create with new email
const order = JSON.parse(payload);
const id = order.customer.id
const customerObj = await client.get({
path: `customers/${id}`,
});
// shopify responds with 404
Ah so update, I think my issue might be related to the search endpoint? The above example actually works, its when I search for it via query parameters like email where it doesn't work. I wonder if there's a lag time between when a customer is created and when it is indexed?
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.
We are closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines
Thank you!