Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi,
I have created a webhook create order where I set the endpoint to call (https), but still receiving webhook is failing.
Here you can find my code:
$jobData = json_decode($request->getContent());
OrdersCreateJob::dispatchAfterResponse(
$jobData
);
return Response::make('', 200);
Warning email from Shopify:
Error: read tcp xx.xx.xx.xx:34696->xx.xx.xxx.xx:443 : i/o timeout
May someone help me why the webhook is failing even after I'm returning a response with status 200 and dispatching the Job in order to response within 5 seconds!
All the best
Hello, @helidona, If webhooks are not responded to quickly, we mark it as a failure so that we can continue serving other apps. Is it possible that although your app responds with a 200 in code, there's some network-level problem or latency that might cause Shopify to timeout on the connection itself?
Do your webhook subscriptions have the correct URIs, and are those hosts available to receive requests via those URIs?
To learn more visit the Shopify Help Center or the Community Blog.
HI @james-langille,
Well, the URLs are correct, but as far as I noticed this is caused sometimes, and the host is available any time because we have set up our app in web hosting.
But, I couldn't figure it out that is caused by?! Or am I doing the right way how I am responding (using dispatch Job in order to return within 5 seconds)
Thank you for your help!