Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions shopify/resources/graphql.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import logging
import shopify
from ..base import ShopifyResource
from six.moves import urllib
import json

logger = logging.getLogger(__name__)


class GraphQL:
def __init__(self):
Expand All @@ -27,6 +30,6 @@ def execute(self, query, variables=None, operation_name=None):
response = urllib.request.urlopen(req)
return response.read().decode("utf-8")
except urllib.error.HTTPError as e:
print((e.read()))
print("")
body = e.read()
logger.error("GraphQL request failed: %s", body)
raise e
Loading