I am having issues only on a few specific orders, requesting order information using a bulk operation for the Orders endpoint.
I am getting the following error
"currentBulkOperation": {
"id": "gid://shopify/BulkOperation/5233612194023",
"status": "FAILED",
"errorCode": "INTERNAL_SERVER_ERROR",
"createdAt": "2025-01-23T14:31:39Z",
"completedAt": null,
"objectCount": "22811",
"fileSize": null,
"url": null,
"partialDataUrl": null
}
The only thing that the orders have in common is that they have a lot of sales within an agreement.
The operation successfully starts, when I poll for the result, the status changes to “Running”, however after a while the status changes to “FAILED”, and the response is as shown above (For the example in this topic, the first poll that showed a “FAILED” status was at 2025-01-23T14:33:26Z ).
The request id for the request initiating the bulk operation is faba3bf3-f9d9-4f97-a64a-511d8c3be15d-1737642699. The bulk operation id is gid://shopify/BulkOperation/5233612194023 (as indicated in the response above)
This is my query
mutation{
bulkOperationRunQuery(
query:"""
{
orders( query: "ids:'############'") {
edges {
node {
...order
}
}
}
}
fragment order on Order{
id
legacyResourceId
createdAt
fullyPaid
displayFinancialStatus
cancelledAt
paymentGatewayNames
totalPriceSet{
...money
}
taxesIncluded
processedAt
totalOutstandingSet{
presentmentMoney{
amount
}
}
agreements {
edges{
node {
id
sales {
pageInfo{
hasNextPage
}
edges {
node {
actionType
totalAmount {
...money
}
}
}
}
}
}
}
lineItems{
edges{
node{
id
duties{
countryCodeOfOrigin
harmonizedSystemCode
taxLines{
title
priceSet{
shopMoney{
amount
}
}
}
price{
shopMoney{
amount
}
}
}
}
}
}
shippingLines{
edges{
node{
id
discountedPriceSet{
...money
}
taxLines{
priceSet{
...money
}
}
}
}
}
transactions{
id
kind
amountSet{
...money
}
status
gateway
processedAt
totalUnsettledSet{
...money
}
fees{
flatFee{
amount
}
flatFeeName
rate
rateName
taxAmount{
amount
}
amount{
amount
}
}
}
}
fragment money on MoneyBag{
shopMoney{
amount
}
presentmentMoney{
amount
}
}
"""
){
bulkOperation{
id
status
}
userErrors{
field
message
}
}
}