Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Internal error. Looks like something went wrong on our end. Request ID: ca80bc9d-6c13-4c48-81ef-317f

Internal error. Looks like something went wrong on our end. Request ID: ca80bc9d-6c13-4c48-81ef-317f

sberlinches
Tourist
4 0 1

Hello!, support and community

 

We are getting many of these errors when we query the Shopify GraphQL and we have been wondering how to deal with them.

 

I debugged one particular customer in order to understand if we could do something on our end, and these are the results of my investigation.

 

- A request is sent to pull all the transactions in a 24 hours period
- Among the data obtained in the first response are: The first 250 orders, a boolean stating whether there's another page, and the cursor to that page.
- This operation is performed until `hasNextPage` is `false` or the `cursor` is `undefined` (Taking care of not hitting the threshold)

 

With some customers at some point of this process, we get the following error `Internal error. Looks like something went wrong on our end.`

 

As part of my investigation, instead of trying to start all over again from the beginning, I also tried to query that particular failing cursor. The outcome is exactly the same: `Internal error. Looks like something went wrong on our end. Request ID: ca80bc9d-6c13-4c48-81ef-317fa5cc2ce1 (include this in support requests).`

 

May I have the reason for that internal error and if there is a way to mitigate those on our end?

Many thanks!

Replies 5 (5)

GrahamS
Shopify Staff (Retired)
193 37 55

Hello @sberlinches ,

 

Thanks for checking in. I'd like to take a look at this for you - may I ask for a more recent x-request-id, assuming you've encountered this issue since the original post?

 

Best,

To learn more visit the Shopify Help Center or the Community Blog.

sberlinches
Tourist
4 0 1

Thanks @GrahamS!

 

I just retried the same import for the same client and for this cursor: eyJsYXN0X2lkIjo0MDk0NTgyMTI4Njk4LCJsYXN0X3ZhbHVlIjoiMjAyMS0xMi0wMiAxNDoyOToyNS4wMDAwMDAifQ==

 

I got the the following error request IDs:
- 2ce1dfc3-d423-4d5c-8874-9d19d1e82278
- 82c36695-06f3-4c5f-b165-953084a213fc
- 403f342c-290f-40eb-ac55-3ed2da3c34f1

 

Thanks for your time

GrahamS
Shopify Staff (Retired)
193 37 55

Hey @sberlinches ,

 

Apologies for the delay! I checked the logs for the ids you provided and they all appear to be returning errors from our db timing out while processing the request. This may be the result of query complexity or quantity of data requested, but either way I've approached our devs for review to see if there is a reasonable workaround for this kind of query.

 

The request ids we use in our investigations expire rather quickly, could I ask for you to supply 1 or 2 more (assuming you can still replicate) if possible? I sincerely appreciate your patience while we continue to investigate the situation.

 

Best,

To learn more visit the Shopify Help Center or the Community Blog.

sberlinches
Tourist
4 0 1

Hi @GrahamS!

No worries, I'm also on the support side and I understand how sometimes work piles up 😉

 

About the query complexity or quantity. I changed in the query the number of orders we ask per bulk, from 250 to only 1 and I still get errors.

 

Could you tell me if this request ID also returns a timeout?

c8436633-e147-4464-a303-a6a5daa149a8

 

This is the query and fails when the script has already retrieved 1937 orders

{
  shop {
    id
    orders(
      first: 1,
      after: "eyJsYXN0X2lkIjo0MDk0MjUzNDMyODkwLCJsYXN0X3ZhbHVlIjoiMjAyMS0xMi0wMiAwNzoxMjowNC4wMDAwMDAifQ==",
      reverse: true,
      query: "
        (
          (financial_status:paid) OR
          (financial_status:partially_paid) OR
          (financial_status:refunded) OR
          (financial_status:partially_refunded)
        ) AND
        (
          (updated_at:>=2021-12-02 updated_at:<=2021-12-02) OR
          (created_at:>=2021-12-02 created_at:<=2021-12-02) OR
          (processed_at:>=2021-12-02 processed_at:<=2021-12-02)
        )
        "
    ) {
      edges {
        cursor
        node {
          id
          totalPrice
          createdAt
          updatedAt
          currencyCode
          totalDiscounts
          displayFinancialStatus
          displayFulfillmentStatus
          totalReceived
          totalRefunded
          totalTax
          customer { id }
          transactions {
            id
            amountV2 {
              amount
              currencyCode
            },
            kind
            status
            createdAt
            processedAt
            gateway
            authorizationCode
          }
        }
      }
      pageInfo {
        hasNextPage
      }
    }
  }
}

 Thanks for your time!

sberlinches
Tourist
4 0 1

I also ran this less complex query:

{
  shop {
    id
    orders(
      first: 1,
      after: "eyJsYXN0X2lkIjo0MDk0MjUzNDMyODkwLCJsYXN0X3ZhbHVlIjoiMjAyMS0xMi0wMiAwNzoxMjowNC4wMDAwMDAifQ==",
      reverse: true,
      query: "
        (
          (financial_status:paid) OR
          (financial_status:partially_paid) OR
          (financial_status:refunded) OR
          (financial_status:partially_refunded)
        ) AND
        (
          (updated_at:>=2021-12-02 updated_at:<=2021-12-02) OR
          (created_at:>=2021-12-02 created_at:<=2021-12-02) OR
          (processed_at:>=2021-12-02 processed_at:<=2021-12-02)
        )
        "
    ) {
      edges {
        cursor
      }
      pageInfo {
        hasNextPage
      }
    }
  }
}

And I got the same error after 1937 orders imported

Request ID: 70ecd1fe-250a-40d4-82c3-94a5ae3abd71

 

Is it possible that there are corrupted data in the DB?

Thanks!