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
The middleware function hasValidAccessToken runs a graphql query to check authentication. If this query fails due to a 503 error, which will occasionally occur at random from Shopify api, the function throws an error which isn't handled by the caller (validateAuthenticatedSession).
This causes my whole server to go down randomly because I can't catch the errors anywhere due to them being async.
The middleware function hasValidAccessToken runs a graphql query to check authentication. If this query fails due to a 503 error, which will occasionally occur at random from Shopify api, the function throws an error which isn't handled by the caller (validateAuthenticatedSession).
This causes my whole server to go down randomly because I can't catch the errors anywhere due to them being async.
Also see #427
Expected behavior
50x errors should cause the middleware to fail normally rather than going uncaught
hasValidAccessToken() should be wrapped in a try/catch block inside validateAuthenticatedSession and have errors handled by handleSessionError()
The text was updated successfully, but these errors were encountered: