A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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
Solved! Go to the solution
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
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
}
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
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
Glad to head it. Yeah good call - passing this feedback along.
Scott | Developer Advocate @ Shopify