Server Error 500

agl_sup
New Member
2 0 1

A simple API request for searching a customer  (customers/search.json?query=email:{}) failled yesterday for no obvious reason. My Log:

[ERROR] 2021-02-10T22:14:34.594Z Error: b'

{ "errors": "Internal Server Error" }

'

What could be the issue here? Any ideas how i could further investigate is appreciated. Thanks

Greg_Kujawa
Shopify Partner
944 79 201

Is this a consistent behavior? I'd imagine more sporadic and just a transient situation on Shopify's end as long as the URL query parameters are correctly used. Just tested this out a moment ago and my API request worked fine. See below.

Untitled.png

agl_sup
New Member
2 0 1

thank you for your answer and checking it from your side.

the error is not consistent. in fact i could not reproduce it, but found it in my logs.
i got several of theese errors over a span of 5 minutes which could validate the theory that this error is on shopifys end. 

is there any official recommondation on how to deal with such situations? retry instantly? put some delay in between?

 

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Hey @agl_sup,

Definitely sounds like a transient error from our end. If it hasn't happened again since, there's no reason to investigate. We recommend handling errors like these by retrying the request after 1s, with an exponential backoff for any subsequent requests if necessary. Usually, one-off errors like this succeed on the 2nd request due to caching. It sounds like something different happened in this particular case since you saw multiple errors in the span of 5 minutes, but an exponential backoff will handle that nonetheless.

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