Error - Unavailable Shop

RareArtifact
Tourist
9 0 2

Does anyone know what this error means or why I'm seeing it? "Error - Unavailable Shop".

I am seeing this error on storefronts I actually run myself as well and have complete control over, so it doesn't have anything to do with permissions being revoked or that anything is down or offline.

Getting it when querying the PRODUCT endpoint in the Shopify API sometimes, but not other times. I'm a bit stumped, so I'll try to provide as much context here as I can.

  1. I have an app that has around 100 shops running it. Using the endpoint to fetch product information and sync with a local database.
  2. Fetch happens through a local script which I run manually. One connection at a time, with an artificial 1 second cooldown in between each query, so this should not be a rate limit situation.
  3. Some queries work fine and return data, but then eventually all start returning this error.
  4. If I start over the loop, I get the same results -- the first ones work fine, the last ones don't.
  5. If I reverse the order in which I'm running the queries, so the ones "at the end" are now the beginning, they work and the other ones fail.

It really feels like some kind of rate limit that just starts rejecting everything after a certain point. But it shouldn't be given the wait time (again, 1 second pause in between each GET request. Also tried with a 2 second pause, same results).

The only thing that stood out was that some of the early installers never had the read products scope (it's new functionality that was added to the app later, and not all have re-authorized with the new scope). So for those users, I get a different error which is expected. The "Error - Unavailable Shop" error seems to only happen after I've gotten a few of the scope errors.

To be clear, I am seeing "Error - Unavailable Shop" on *every* query after a certain point, including stores that DO have read products scope. But it does seem to always start after the ones that didn't have the scope.

Could this be the reason? Is it a security feature in Shopify that's basically saying "Hey, this guy is trying to access crap he isn't supposed to, so lets block him for a little while?" It doesn't seem like that's the case since it all works if I start over the loop. It's just really strange.

0 Likes
_JB
Shopify Staff
Shopify Staff
823 97 178

Hey @RareArtifact,

To investigate further please provide the X-Request-ID from the response headers of a few failed calls, and we'll use this to look for more information in the logs.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
RareArtifact
Tourist
9 0 2

It's fine, I'm actually just an idiot. Forgot to clear a variable in a for loop; only one threw the error, every other site was was just reading the same string. Derp.

0 Likes