Handle there not being a webhook set up

This commit is contained in:
Mark Veidemanis 2021-12-26 23:41:29 +00:00
parent d0a5782449
commit 3c80ead036
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ class Revolut(object):
if r.status_code == 200: if r.status_code == 200:
parsed = r.json() parsed = r.json()
return parsed return parsed
elif r.status_code == 404:
return {}
else: else:
self.log.error("Cannot get webhooks: {content}", r.content) self.log.error("Cannot get webhooks: {content}", r.content)
return False return False