-
Notifications
You must be signed in to change notification settings - Fork 387
Transient shopify error (for html response instead of json) is thrown as HttpRequestError instead of HttpRetriableError #257
Comments
Hey @wszaranski, thanks for putting in a PR for your issue. I'm going to ask that we hold off on your proposed solution since the problem I want to tackle is why you're seeing intermittent HTML responses in the first place. |
I have already applied this patch using patch-package but I can still add your suggestion and add logs to check if original error still persists. Sorry I didn't get back to you but time before Black Friday and Christmas isn't the best for this kind of changes. |
@mllemango it looks like it could be cloudflare try again response. This are the response headers. I think with date and
|
Also getting this intermittently, from admin api: without any other detail. Would help to log the actual response, probably it has some detail about the error. Can't reproduce reliably. |
Issue summary
Sometimes query returns non json response (probably html but only parsing error is logged).
This error is wrongly interpreted as request error and isn't retried.
Expected behavior
HttpRetriableError
should be thrown instead ofHttpRequestError
Actual behavior
When we get non json response HttpRequestError which is caused by response.json() parsing
HttpRequestError
is thrown.Steps to reproduce the problem
It's hard to provide reproduce steps for transient error but I'll provide PR with this situation handled in test case.
The text was updated successfully, but these errors were encountered: