Shop query returns an internal error

endpoint: api/2024-10/graphql.json
query:

{
    "query": "\n  query {\n    shop {\n      description\n      moneyFormat\n      name\n      paymentSettings {\n        acceptedCardBrands\n        cardVaultUrl\n        countryCode\n        currencyCode\n        enabledPresentmentCurrencies\n        supportedDigitalWallets\n        shopifyPaymentsAccountId\n      }\n      primaryDomain {\n        host\n        sslEnabled\n        url\n      }\n      privacyPolicy {\n        ...Policy\n      }\n      refundPolicy {\n        ...Policy\n      }\n      shippingPolicy {\n        ...Policy\n      }\n      shipsToCountries\n      termsOfService {\n        ...Policy\n      }\n    }\n  }\n  \n  fragment Policy on ShopPolicy {\n    handle\n    id\n    title\n    body\n    __typename\n  }\n\n",
    "variables": {}
}

Getting the following response:

{
    "errors": [
        {
            "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: f07ccfc1-eeb1-4644-aa3c-650d5d3cf7cd-1757534847 (include this in support requests).",
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR",
                "requestId": "f07ccfc1-eeb1-4644-aa3c-650d5d3cf7cd-1757534847"
            }
        }
    ]
}

This only happens when accept-language header is supplied or set to anything else but *, although * also still sometimes returns an internal error. Not supplying the header or supplying an empty string returns the data without errors.

This is new - these storefronts have been running for 2+ years without any issues, and it’s also not happening on all of them. Any insights as to what’s causing it? We had to hardcode the shop response for now, as it was breaking our add to cart functionality.

Hello @christinna9031

Your analysis is correct; this is a server-side bug on Shopify’s end. The accept-language header is causing an internal error when your GraphQL query attempts to fetch the translatable shop policies. You should report this immediately to Shopify Support and provide them with the full requestId from the error message, as only their engineers can resolve a backend issue.

While you wait for a fix, a robust workaround is to conditionally modify your query. In your application code, detect if the accept-language header is present; if it is, send the query but remove the privacyPolicy, refundPolicy, and other policy fields.

This will prevent the error and still allow you to fetch the critical, non-translatable shop data.

Hope this helps!