Missing "throttleStatus" property

Highlighted
Shopify Partner
58 0 11

Hi Shopify,

 

On November 15, 23, and 24, I noticed some new errors in the logs:

"Undefined property throttleStatus".

 

This is of course the throttle status property returned by the GraphQL API to facilitate rate limiting. I have never seen this before until now, and I suppose it's only intermittent, so I'm wondering, if it possible that the GraphQL API may not always return a throttle status?

 

The "cost" IS being returned with the other props for requestedQueryCost, and actualQueryCost, it's just throttleStatus that's not always returned it seems.

 

Thanks!

Kris

0 Likes
Highlighted
Shopify Partner
58 0 11

Hi Folks,

 

Unfortunately I need to stress the urgency a little here. Since the "throttleStatus" is now randomly not available, my throttle logic is no longer working correctly and my API calls are starting to get throttled.

 

Does anyone know what might be happening here? 

0 Likes
Highlighted
Shopify Partner
58 0 11

Anyone? Shopify? Help?

 

Is it normal that the throttleStatus attribute is just...missing?

 

I'm intermittently getting requested and actual query cost, but throttleStatus (with the useful stuff) is just undefined. I can't imagine this is normal.

0 Likes
Highlighted

@Kris_Doyle wrote:

Anyone? Shopify? Help?

 

Is it normal that the throttleStatus attribute is just...missing?

 

I'm intermittently getting requested and actual query cost, but throttleStatus (with the useful stuff) is just undefined. I can't imagine this is normal.


Hi @Kris_Doyle ,

 

We just hit the same error. I guess when the merchant is in staff plan, we don't get throttleStatus. You need to add an additional null check for throttleStatus.

 

I hope Shopify adds an exception to the graphql response section about it.

https://shopify.dev/concepts/about-apis/rate-limits

Co-Founder / Developer at https://merchbees.com/
Our Shopify App: https://apps.shopify.com/merchbees-low-stock-alert
Merchbees Low Stock Alert - Keep track of your low stock items by email
1 Like
Highlighted
Shopify Partner
58 0 11

Thanks very much @Mete ,

 

I threw a null check in there a while back so I guess that's how it will stay :)

 

I'm a little confused why they wouldn't include the throttleStatus for those plans. I understand that the staff aren't throttled, but the way I'd probably handle that is by just passing back whatever the max is all the time rather than just removing it so we don't need special checks...it just continues to work normally.

 

Also, it's probably best to still have a throttle in place in the case of bad actors who might take advantage of a staff plan to slam the API. Not likely I guess but security shouldn't be based on what will happen ;)

 

Agree 100% on adding it to the docs though but maybe they left it out on purpose (for the above reason)?

 

Cheers,

Kris

0 Likes
Highlighted
Shopify Partner
58 0 11

Hey @Mete ,

 

Thanks again for the help with this. Unfortunately it seems I spoke too soon. Just last night I received another call with a missing throttleStatus. This time it was just a regular user with a Basic Shopify plan. The other throttle elements were there, just not the throttleStatus.

 

Seems this is still a mystery sadly.

 

Kris

1 Like
Highlighted

@Kris_Doyle wrote:

Hey @Mete ,

 

Thanks again for the help with this. Unfortunately it seems I spoke too soon. Just last night I received another call with a missing throttleStatus. This time it was just a regular user with a Basic Shopify plan. The other throttle elements were there, just not the throttleStatus.

 

Seems this is still a mystery sadly.

 

Kris


Hey @Kris_Doyle ,

 

Thanks for the heads up! Our app was throwing errors because even the official nodejs library doesn't null check throttleStatus. We sent a fix to github yesterday.

 

I hope someone from staff explains whats going on and at least, puts this exception to the docs :)

Co-Founder / Developer at https://merchbees.com/
Our Shopify App: https://apps.shopify.com/merchbees-low-stock-alert
Merchbees Low Stock Alert - Keep track of your low stock items by email
1 Like