Skip to content

Commit

Permalink
fix: BadRequest tg err (#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Apr 8, 2024
1 parent da0319d commit a07e5bd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,10 @@ def with_monitoring():
tb = traceback.format_exc()
now = datetime.now()
message = f"`[{now}]`\n🔥 {export_mode} Vaults API update for {Network.name()} failed!\n"
try:
with suppress(BadRequest):
detail_message = (message + f"```\n{tb}\n```")[:4000]
updater.bot.send_message(chat_id=private_group, text=detail_message, parse_mode="Markdown", reply_to_message_id=ping)
updater.bot.send_message(chat_id=public_group, text=detail_message, parse_mode="Markdown")
except BadRequest:
pass
#detail_message = message + f"{error.__class__.__name__}({error})"
#updater.bot.send_message(chat_id=private_group, text=detail_message, parse_mode="Markdown", reply_to_message_id=ping)
#updater.bot.send_message(chat_id=public_group, text=detail_message, parse_mode="Markdown")
raise error
message = f"✅ {export_mode} Vaults API update for {Network.name()} successful!"
updater.bot.send_message(chat_id=private_group, text=message, reply_to_message_id=ping)

0 comments on commit a07e5bd

Please sign in to comment.