Handle error when downloading announce

main
Bob Mottram 2023-02-21 11:28:51 +00:00
parent 132db64f0b
commit b1d690e267
1 changed files with 5 additions and 0 deletions

View File

@ -5351,6 +5351,11 @@ def download_announce(session, base_dir: str, http_prefix: str,
base_dir, nickname, domain, post_id,
recent_posts_cache)
return None
if announced_json.get('error'):
print('Attempt to download announce returned an error ' +
post_json_object['object'] + ' ' +
str(announced_json))
return None
if not announced_json.get('id'):
print('WARN: announced post does not have an id ' +
str(announced_json))