summaryrefslogtreecommitdiff
path: root/crawler.py
diff options
context:
space:
mode:
Diffstat (limited to 'crawler.py')
-rw-r--r--crawler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawler.py b/crawler.py
index def9f82..44396ae 100644
--- a/crawler.py
+++ b/crawler.py
@@ -7,6 +7,9 @@ import aiohttp
APIURL = "https://api.dc01.gamelockerapp.com/"
+class ApiError(Exception):
+ pass
+
class Crawler(object):
def __init__(self, token):
"""Sets constants."""
@@ -65,7 +68,7 @@ class Crawler(object):
if "errors" in res:
logging.warn("API returned error: '%s'",
res["errors"])
- break
+ raise ApiError(res["errors"])
yield res