Occasional INTERNAL_SERVER_ERROR when querying ProductSale from Orders

Funnel
Shopify Partner
28 0 15

Hi experts,

We are using GraphQl (2022-07) to query the ProductSale object from Orders as follows:

 

  orders {
    edges {
      node {
        agreements {
          edges {
            node {
              sales {
                edges {
                  node {
                    ... on ProductSale {
                      id
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

 

In most cases this works fine and the query returns data. For some dates however, Shopify returns INTERNAL_SERVER_ERROR with the following response:

 

Bulk operation error: {'data': {'node': {'id': 'gid://shopify/BulkOperation/123455678', 'status': 'FAILED', 'errorCode': 'INTERNAL_SERVER_ERROR', 'createdAt': '2022-12-05T15:21:47Z', 'completedAt': None, 'objectCount': '4502', 'rootObjectCount': '2000', 'fileSize': None, 'url': None, 'partialDataUrl': None}}, 'extensions': {'cost': {'requestedQueryCost': 1, 'actualQueryCost': 1, 'throttleStatus': {'maximumAvailable': 1000.0, 'currentlyAvailable': 999, 'restoreRate': 50.0}}}}

 


Removing the ProductSale object seem to fix the problem. But this object and its data is crucial for our work.  

Do you have any idea what could be the issue here?

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1422 233 488

Hi @Funnel,

 

For this type of specific issue with 500 - Internal Server Error responses we recommend reaching out to [Partner Support] with more detailed information about what happened so it can be investigated.

 

Important information includes a date/time/timezone within the past 7 days when the issue occurred, text form of the raw data returned with X-Request-ID, which store it happened on and what app made the API call.

 

 Thanks!

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