internal server error

Solved

internal server error

hmjeh1
Tourist
4 0 2

 

recently there have been several accounts where I get an error after about a minute of running the request
The status starts running, and after about a minute, I get  in "status": "FAILED," and "errorCode": "INTERNAL_SERVER_ERROR,"
I changed to several API versions
I used 2023 07
And also, in 2023 04
And in both, I get the same error

this is my query

 

mutation {
      bulkOperationRunQuery(
       query: """
       {
        
     orders(query:"(processed_at:>'2023-08-15' processed_at:<'2023-08-16') ")
      {
        edges
        {
          node
          {
            id
            processedAt
            
            tags
            physicalLocation {
              name
            }
            cancelledAt
            cancelReason
            paymentGatewayNames
            shippingLine
            {
              title
            }
            billingAddress
            {
              address1
              address2
              city
              zip
              provinceCode
              province
              phone
              name
              formattedArea
              countryCodeV2
              countryCode
              country
              company
            }
            billingAddressMatchesShippingAddress
            shippingAddress
            {
              address1
              address2
              city
              zip
              provinceCode
              province
              phone
              name
              formattedArea
              countryCodeV2
              countryCode
              country
              company
            }
            cartDiscountAmountSet
            {
              shopMoney
              {
                amount
              }
            }
            totalDiscountsSet 
            {
              shopMoney 
              {
                amount
              }
            }
            publication 
            {
            name
            }
            customer
            {
              id
              lastName
              firstName
              email
              tags
            }
            tags
            currencyCode
            confirmed
            closedAt
            createdAt
            customerAcceptsMarketing
            closed
            clientIp
            discountCode
            customerJourneySummary
            {
              customerOrderIndex
              firstVisit
              {
                source
                sourceType
                utmParameters
                {
                  campaign
                  content
                  medium
                  source
                  term
                }
                referrerUrl
                referralCode
                landingPage
              }
              lastVisit
              {
                source
                sourceType
                utmParameters
                {
                  campaign
                  content
                  medium
                  source
                  term
                }
                referrerUrl
                referralCode
                landingPage
              }
            }
            displayFinancialStatus
            displayFulfillmentStatus
            fulfillable
            hasTimelineComment
            fullyPaid
            name
            note
            riskLevel
            restockable
            requiresShipping
            refundable
            presentmentCurrencyCode
            unpaid
            updatedAt
            subtotalLineItemsQuantity
            totalReceivedSet {
              shopMoney {
                amount
              }
            }
            totalPriceSet
            {
              shopMoney
              {
                amount
              }
            }
            totalShippingPriceSet
            {
              shopMoney
              {
                amount
              }
            }
            totalTaxSet 
            {
              shopMoney 
              {
               amount
              }
            }
            refunds
            {
              id
              createdAt
              totalRefundedSet
              {
                shopMoney
                {
                  amount
                }
              }
            }
            
          }
        }
      }
    
       }
       """
       ) {
        bulkOperation {
          id
          status
        }
        userErrors {
          field
          message
        }
      }
}

 

Was there a change or something?
Even if I requested with only id
I got the same error

Accepted Solution (1)
Amichay
Shopify Partner
40 1 5

This is an accepted solution.

We just figured it out.

 

It look like we blocked because of not filling the "Protected customer data access" form.

 

Only querying the the orders node synchronously gives us the proper error...

This app is not approved to access the Order object. See https://partners.shopify.com/123/apps/456/customer_data for more details.

 

@SBD_ Please provide better error message also to the bulk operation 

https://shopify.dev/docs/api/admin-graphql/2023-01/objects/BulkOperation

View solution in original post

Replies 6 (6)

SBD_
Shopify Staff
1831 273 419

Hey @hmjeh1 

 

Are there any IDs included in the error message?

Scott | Developer Advocate @ Shopify 

Amichay
Shopify Partner
40 1 5

Hi @SBD_ ,

 

For example,

 

{
  id: 'gid://shopify/BulkOperation/3165242851526',
  status: 'FAILED',
  errorCode: 'INTERNAL_SERVER_ERROR',
  createdAt: '2023-08-18T04:46:56Z',
  completedAt: null,
  objectCount: '0',
  fileSize: null,
  url: null,
  partialDataUrl: null
}

 

Amichay
Shopify Partner
40 1 5

@SBD_ BTW I'm @hmjeh1 associate...

 

Let say that if we had ~10 Bulk Operations failed at night, now we have 1160 failures (X10) at night, nothing changed in our side.

SBD_
Shopify Staff
1831 273 419

Thanks @Amichay 

 

Please reach out to support via your Partner Dashboard, this will connect you with an API specialist who can dig in further.

Scott | Developer Advocate @ Shopify 

Amichay
Shopify Partner
40 1 5

This is an accepted solution.

We just figured it out.

 

It look like we blocked because of not filling the "Protected customer data access" form.

 

Only querying the the orders node synchronously gives us the proper error...

This app is not approved to access the Order object. See https://partners.shopify.com/123/apps/456/customer_data for more details.

 

@SBD_ Please provide better error message also to the bulk operation 

https://shopify.dev/docs/api/admin-graphql/2023-01/objects/BulkOperation

SBD_
Shopify Staff
1831 273 419

Glad to head it. Yeah good call - passing this feedback along.

Scott | Developer Advocate @ Shopify