I’ve had this before when trying to create large order using the Rest API. However, with the GraphQL api I am getting this error when trying to create orders with like 40 lines on them…
The only thing in common with these orders is that their order total amount is fairly large ~ $10,000. Although I would be surprised if this had anything to do with it.
Error message:
{
networkStatusCode: 504,
message: "GraphQL Client: Gateway Timeout",
response: Response {
body: ReadableStream { locked: false },
bodyUsed: false,
headers: Headers {
"alt-svc": 'h3=":443"; ma=86400',
"cf-cache-status": "DYNAMIC",
"cf-ray": "8ddde3fb1eff4264-EWR",
"content-length": "24",
"content-type": "text/plain",
date: "Tue, 05 Nov 2024 15:32:54 GMT",
nel: '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}',
"report-to": '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=k0bQFyXVZoSISONOA26ZDToo1ChRgpVLfut3cIy4XJgEEKRmPaCTUhffmmJMuInI6iEYu6YSvsAp9nPhrNyYZMVOMIQhueEOHBXmNY9YRvano2mDTINFK%2Bad7sM%2BtyvIQMBSiN%2FB7KNAZI0b6AdlUM2d6ayFvggC8AUb"}],"group":"cf-nel","max_age":604800}',
server: "cloudflare",
"server-timing": "cfRequestDuration;dur=90053.999901, ipv6",
"x-content-type-options": "nosniff",
"x-dc": "gcp-us-east1,gcp-us-east1,gcp-us-east1",
"x-download-options": "noopen",
"x-permitted-cross-domain-policies": "none",
"x-request-id": "64eb3463-ac98-45c7-a4ee-4ddce9591039-1730820684",
"x-sorting-hat-podid": "317",
"x-sorting-hat-shopid": "76003541310",
"x-xss-protection": "1; mode=block"
},
ok: false,
redirected: false,
status: 504,
statusText: "Gateway Timeout",
url: "https://[redacted].myshopify.com/admin/api/2024-10/graphql.json"
}
}
I’m also getting some requests come back with “Internal Server Error”.
For example;
{
lineItems: [
{
quantity: 1,
title: 'Bourbon Street Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'South Bank Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Humble Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Milwaukee Bucks Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Bay Street Shelf Set (12"/24")',
priceSet: { shopMoney: { amount: 375, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'River Street Shelf Set (12"/24")',
priceSet: { shopMoney: { amount: 375, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Alladin 2 Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Bridge Street Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Celebration Pointe Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Dadeland Shelf Set (12"/24")',
priceSet: { shopMoney: { amount: 375, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Desert Ridge Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Dolphin Mall Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Fashion Show Food Court Shelf Set (24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Florida Mall Shelf Set 12"/24")',
priceSet: { shopMoney: { amount: 375, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Forum Shops Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Grand Canal Shelf Set 20"/28")',
priceSet: { shopMoney: { amount: 385, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'LA Boardwalk Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Mall of Georgia Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Mall of LA Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Patriots Place Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Promenade Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Tempe Market Place Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 1,
title: 'Venetian 2 Shelf Set 24"/36")',
priceSet: { shopMoney: { amount: 390, currencyCode: "USD" } },
sku: "Shelf"
},
{
quantity: 101,
title: "Steel UpLight Shelf BracketsColor : Black",
priceSet: { shopMoney: { amount: 13, currencyCode: "USD" } },
sku: "587"
},
{
quantity: 1,
title: "Fedex (Bourbon Street)",
priceSet: { shopMoney: { amount: 29.35, currencyCode: "USD" } },
sku: "Ship"
},
{
quantity: 1,
title: "Fedex (South Bank)",
priceSet: { shopMoney: { amount: 32.99, currencyCode: "USD" } },
sku: "Ship"
},
{
quantity: 1,
title: "Fedex (Humble)",
priceSet: { shopMoney: { amount: 32.99, currencyCode: "USD" } },
sku: "Ship"
},
{
quantity: 1,
title: "Fedex (Milwaukee Bucks)",
priceSet: { shopMoney: { amount: 29.35, currencyCode: "USD" } },
sku: "Ship"
},
{
quantity: 1,
title: "Fedex (Bay Street)",
priceSet: { shopMoney: { amount: 28.98, currencyCode: "USD" } },
sku: "Ship"
},
{
quantity: 1,
title: "Fedex (River Street)",
priceSet: { shopMoney: { amount: 28.98, currencyCode: "USD" } },
sku: "Ship"
}
],
tags: [ "shipped", "AB-1366", "single-import" ]
}
Oddly, I can send in the exact same order as a draft order and it is created successfully.
And I can send in a single item and it works as expected. It only errors when the total gets over 10,000.