mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-27 14:01:13 +00:00
Skipping instead of stopping
This commit is contained in:
parent
9231a78881
commit
5d36cd2f7e
4
twoot.py
4
twoot.py
|
@ -1222,8 +1222,8 @@ def main(argv):
|
||||||
_, _, _, exception_message = e.args
|
_, _, _, exception_message = e.args
|
||||||
if 'Text character limit' in exception_message:
|
if 'Text character limit' in exception_message:
|
||||||
# ERROR (('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Text character limit of 500 exceeded'))
|
# ERROR (('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Text character limit of 500 exceeded'))
|
||||||
logging.error('Tweet text too long: %s characters', str(len(tweet['tweet_text'])))
|
logging.error('Toot text too long: %s characters. Skipping.', str(len(tweet['tweet_text'])))
|
||||||
shutdown(-1)
|
continue
|
||||||
elif 'Try again in a moment' in exception_message:
|
elif 'Try again in a moment' in exception_message:
|
||||||
# ERROR ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Cannot attach files that have not finished processing. Try again in a moment!')
|
# 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.')
|
logging.warning('Mastodon API Error 422: Cannot attach files that have not finished processing. Waiting 30 seconds and retrying.')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user