For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
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"
}
}
]
}
Solved! Go to the solution
This is an accepted solution.
Hi Jorge12, this should now be fixed.
To learn more visit the Shopify Help Center or the Community Blog.
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?
To learn more visit the Shopify Help Center or the Community Blog.
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"
}
}
]
}
Do you have any line items that are linked to a productVariant that is now in draft status or been deleted?
Hi Jorge12, I believe we've identified the bug. Will post again when we have confirmed the fix is live. The error stems from a zero value discount that was on the order.
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Hi Jorge12, this should now be fixed.
To learn more visit the Shopify Help Center or the Community Blog.
Perfect, I just confirmed it's fixed. Thanks for seeing this through to a fix!!