From 0bee03dd5606869e34ab99e620a56f2d6a58f35a Mon Sep 17 00:00:00 2001 From: jeancf Date: Tue, 18 Jul 2023 15:01:25 +0200 Subject: [PATCH] Start investigation of MastodonAPIError --- twoot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twoot.py b/twoot.py index 1c85829..3c99ac3 100755 --- a/twoot.py +++ b/twoot.py @@ -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.')