Development discussions around Shopify APIs
Hello,
I receive that error when triggering webhooks, how can I debug that?
It's a laravel app, and the webhooks are activating jobs on that app. In the handle method of each job, I used
http_response_code(200);
or
header('HTTP/1.0 200 OK');
right at the beginning of the methods, but none of them seem to be working, what am I missing?
Hey Aurel,
It's likely that you're running into the 5-second retry timeout for webhooks. As documented, Shopify waits 5 seconds for a 200 range response before re-sending the webhook to the provided address.
When you set the header of your response, you're not actually returning the response as well, which might be the issue. We recommend that partners first submit a response back to Shopify before processing the request as this can often take longer than the 5-second window. Using threads is one possible solution here.
If this doesn't sound like it could be the reason for your problem, then please provide me with the `X-Request-Id` header sent with the webhook and I can investigate further!
Hi @Zameer
I am getting the same error only for 'create/product' webhook. In app I am already processing the data in background job and returning 200 response immediately. Also i have bypassed the cache for the webhook endpoints from cloudflare. I have also excluded webhook endpoints from cloudflare page rules. What could be the other reasons, I am getting Non 200-level response error.
Thanks
User | RANK |
---|---|
53 | |
11 | |
5 | |
5 | |
4 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023