You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In production we occasionally get this from @shopify/admin-api-client:
Received an error response (404 Not Found) from Shopify:
{
"networkStatusCode": 404,
"message": "GraphQL Client: Not Found",
"response": {}
}
It hits multiple stores in clusters, then stops. The same shop / order / token / API version path returns 200 if we curl it directly from the same host while the SDK is 404'ing, and restarting the Node process makes the errors stop for hours. Affects orderUpdate, orderCancel, order(id) queries.
Our guess (would love confirmation or correction)
It looks like it might be the undici keep-alive socket reuse pattern from nodejs/undici#1415 and nodejs/node#47130 — stale sockets in the pool getting routed to a different edge backend after a rotation. But we're not sure if that's actually what's happening here or if we're using the SDK wrong.
If it is the undici pool, would you recommend a customFetchApi with a tuned Agent as the right workaround? Is there a preferred pattern?
The current retries option excludes 404 — is that intentional, or would including this specific "GraphQL Client: Not Found" shape (which is the wrapper's signal for an empty-body transport 404) be in scope?
Anything we should be checking on our side before assuming it's an SDK issue?
What we're seeing
In production we occasionally get this from
@shopify/admin-api-client:It hits multiple stores in clusters, then stops. The same shop / order / token / API version path returns
200if wecurlit directly from the same host while the SDK is 404'ing, and restarting the Node process makes the errors stop for hours. AffectsorderUpdate,orderCancel,order(id)queries.Our guess (would love confirmation or correction)
It looks like it might be the undici keep-alive socket reuse pattern from
nodejs/undici#1415 and nodejs/node#47130 — stale sockets in the pool getting routed to a different edge backend after a rotation. But we're not sure if that's actually what's happening here or if we're using the SDK wrong.
Questions
admin-api-client? We saw a similar-shaped report in admin-api-client + node-fetch erroring since a few days: Client network socket disconnected before secure TLS connection was established #1851 but didn't find anything confirming this exact 404 shape is the same root cause.customFetchApiwith a tunedAgentas the right workaround? Is there a preferred pattern?retriesoption excludes 404 — is that intentional, or would including this specific "GraphQL Client: Not Found" shape (which is the wrapper's signal for an empty-body transport 404) be in scope?Environment
@shopify/admin-api-client1.1.1,@shopify/shopify-api12.3.0Happy to share more details / repro if useful.