Start investigation of MastodonAPIError

This commit is contained in:
jeancf 2023-07-18 15:01:25 +02:00
parent e512838a0e
commit 0bee03dd56

View File

@ -1218,7 +1218,10 @@ def main(argv):
else:
toot = mastodon.status_post(tweet['tweet_text'], replied_to_toot, media_ids=media_ids)
except MastodonAPIError:
except MastodonAPIError as e:
logging.debug('PROBING DETAILS OF MastodonAPIError')
logging.debug(e.args)
logging.debug(e.__notes__)
# Assuming this is an:
# ERROR ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Cannot attach files that have not finished processing. Try again in a moment!')
logging.warning('Mastodon API Error 422: Cannot attach files that have not finished processing. Waiting 30 seconds and retrying.')