Internal Server Error: Products Filters

alexandervitto1
Shopify Partner
2 0 0

Hi all,

I try to query product detail with filters variable indeed but sometimes I've got internal server error. But, when I'm querying without filters variable the response is always a success.

query with filters variable:

query getCollection($country: CountryCode!, $handle: String!, $size: Int!) @inContext(country:$country) {
    collection(handle:$handle ) {
      handle 
      products(first: $size, sortKey:MANUAL) {
      filters{
        label
      }
      edges {
        node {
          id
          title
          
        }
      }
    }
  }
}



 

response:

 

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 69da52ae-b711-455b-9ff1-52c07979dea3 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "69da52ae-b711-455b-9ff1-52c07979dea3"
      }
    }
  ]
}

 

 

query without filters variable:

query getCollection($country: CountryCode!, $handle: String!, $size: Int!) @inContext(country:$country) {
    collection(handle:$handle ) {
      handle 
      products(first: $size, sortKey:MANUAL) {
      edges {
        node {
          id
          title
          
        }
      }
    }
  }
}

 

 

 

response:

{
  "data": {
    "collection": {
      "handle": "new-in",
      "products": {
        "edges": [
          {
            "node": {
              "id": "gid://shopify/Product/6949750210657",
              "title": "SNEAKER CAMPO IN PELLE BIANCA"
            }
          }
        ]
      }
    }
  },
  "extensions": {
    "context": {
      "country": "US",
      "language": "EN"
    }
  }
}

 

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1440 235 489

Hey @alexandervitto1,


I was able to locate logs for the requestId value associated with the "INTERNAL SERVER ERROR" but couldn't find any additional instances of similar behavior within the timeframe searched, or any other errors that were cause for concern. That said, it isn't entirely unexpected to encounter the occasional error returned by our APIs. To help mitigate any potential issues these errors may cause on your end, we generally recommend implementing retry logic into an app's client/middleware.
 

In the case that errors are persistent after retrying, the best next steps would be reaching out to Shopify Support directly with the following details: x-request-id values and timeframes in UTC for examples where the error was returned (from the response body or headers), along with an estimate of when the behavior started, how long it has persisted, and any steps to replicate.


Hope this helps provide some insights moving forward - Cheers!

@awwdam | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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