Error: Non 200-level response

Aurel_Dragut
New Member
2 0 0

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?

Replies 4 (4)
Zameer
Shopify Staff
Shopify Staff
297 31 89

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!

Aurel_Dragut
New Member
2 0 0
Hi, Zameer, the problem was a 'rookie' mistake: I saw quite late that the
webhooks were set to be sent to .../webhooks/webhook-path and my app was
set to 'listen' on .../webhook/webhook-path
iamdeepakbasnal
Shopify Partner
9 0 9

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

 
shingekinokyoji
Excursionist
20 1 2

Were you able to figure it out?