diff --git a/shopify/resources/graphql.py b/shopify/resources/graphql.py index 33525ef1..846d11bc 100644 --- a/shopify/resources/graphql.py +++ b/shopify/resources/graphql.py @@ -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): @@ -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