INTERNAL_SERVER_ERROR intermittently on fulfillmentOrders

I keep receiving an intermittent INTERNAL_SERVER_ERROR when making requests for fulfillmentOrders and I need help deciphering the root cause.

My hunch is that it is due to the query:updated_at because there have been multiple times I’ve had a running query stop with that error, then when a new query tries to pick up from the last updated_at in my DB, I only get that error until I manually change the updated_at date.

For example, I ran the following query and received the resulting error:

fulfillmentOrders(includeClosed: true, query: "updated_at:>='2022-11-18T15:51:02.000Z'", first: 250, after: null) { 
  nodes { 
    deliveryMethod { 
      presentedName, 
      serviceCode, 
      methodType 
    }, 
    id, 
    orderProcessedAt, 
    orderId, 
    orderName, 
    shopUpdatedAt: updatedAt 
  }, 
  pageInfo { 
    hasNextPage, 
    endCursor 
  } 
} 
[
  {
    message: 'Internal error. Looks like something went wrong on our end.\n' +
      'Request ID: 98bc4055-6c04-4811-a60b-18b61e5da2cc-1738083472 (include this in support requests).',
    extensions: {
      code: 'INTERNAL_SERVER_ERROR',
      requestId: '98bc4055-6c04-4811-a60b-18b61e5da2cc-1738083472'
    }
  }
]

However after that, I changed the date in the query variable from "updated_at:>='2022-11-18T15:51:02.000Z'" to "updated_at:>='2022-10-18T15:51:02.000Z'" and the error didn’t occur.

Just wanted to check in and say that adding a sortKey argument with the value of UPDATED_AT solved the issue.

I incorrectly assumed that querying by updated_at would’ve sorted the results by that field, but the sortKey’s default value is ID, so it was returning the results sorted by Id, which caused some unknown issue.

1 Like

Hi Bob - thanks for coming back to update this post, and glad you figured this out!

Let us know if you run into any other issues.