INTERNAL_SERVER_ERROR when fetching Subscription Contract with Lines via GraphQL

Solved
Jorge12
Tourist
9 0 1

Hello,

I've recently had my custom app whitelisted for access to the new subscription APIs. 

I'm able to fetch Subscription Contracts for my store, so long as I'm requesting the basic id, status, createdAt, etc fields.  When I request the SubscriptionLines on the subscription contract, I get an internal error.

Has anyone else encountered this, or can a Shopify Dev check the logs for my request and see what's up?

Thank you!

 

 

Request:

 

 

 

 

 

query {
    subscriptionContracts(first: 10) {
        edges {
            node {
                id
                createdAt
                status
                lines(first: 10) {
                    edges{
                        node{
                            productId
                            quantity
                            sellingPlanId
                            sellingPlanName
                            sku
                            title
                            variantId
                            variantTitle
                        }
                    }
                }
            }
        }
    }
}

 

 

 

 

 

 

Response:

 

 

 

 

 

{
    "errors": [
        {
            "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 868c320d-5154-44bd-8117-ebfe4932e371 (include this in support requests).",
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR",
                "requestId": "868c320d-5154-44bd-8117-ebfe4932e371"
            }
        }
    ]
}

 

 

 

 

0 Likes
ewalker
Shopify Staff
Shopify Staff
23 3 7

I believe this is due to a bug that has since been resolved. Can you confirm that your same query no longer returns an error?

0 Likes
Jorge12
Tourist
9 0 1

Thanks for the update, however I'm experiencing the same issue still in our production store. 

A test store that we spun up in December via the Partner dashboard executes the same query successfully without issue.  I don't know if the state of our production store is in some way compromised?   

Here is the same request/response from production run just now today.  Removing the "lines" portion makes the query execute as expected.

 

Request:

query {
  subscriptionContracts(first: 10) {
    edges {
      node {
        id
        lines(first: 10) {
            edges{
            node{
                id
            }
            }
        }
      }
    }
  }
}

Response:

{
    "errors": [
        {
            "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 2e397314-a46c-4697-91a9-a5956f88f854 (include this in support requests).",
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR",
                "requestId": "2e397314-a46c-4697-91a9-a5956f88f854"
            }
        }
    ]
}

 

0 Likes
colinloretz
Excursionist
14 1 2

Do you have any line items that are linked to a productVariant that is now in draft status or been deleted?

0 Likes
ewalker
Shopify Staff
Shopify Staff
23 3 7

Hi 

0 Likes
ewalker
Shopify Staff
Shopify Staff
23 3 7

This is an accepted solution.

Hi Jorge12, this should now be fixed.

0 Likes
Jorge12
Tourist
9 0 1

Perfect, I just confirmed it's fixed.  Thanks for seeing this through to a fix!!

0 Likes