Handle channel not found in clips

This commit is contained in:
Ivan Habunek
2020-11-10 12:40:11 +01:00
parent bb2de4af96
commit 6108b15587

View File

@ -153,7 +153,12 @@ def get_channel_clips(channel_id, period, limit, after=None):
"period": period.upper(),
})
response = gql_query(query)
user = response["data"]["user"]
if not user:
raise ConsoleError("Channel {} not found".format(channel_id))
return response["data"]["user"]["clips"]