fix(Backend): Gravity Bridge response extraction & bot exception crash loop
* Restore step.content.parts traversal missing in prior bugfix * Catch wide exceptions in bot.py chat_snapshot_scanner and move broken files to .json.failed to prevent loop aborts blocking the pending queue
This commit is contained in:
6
bot.py
6
bot.py
@@ -1381,8 +1381,12 @@ class GravityBot(commands.Bot):
|
||||
logger.error(f"[SNAPSHOT] Discord send failed for {project}: {e}")
|
||||
|
||||
f.unlink() # Cleanup
|
||||
except (json.JSONDecodeError, OSError) as e:
|
||||
except Exception as e:
|
||||
logger.warning(f"Bad chat snapshot {f.name}: {e}")
|
||||
try:
|
||||
f.rename(f.with_suffix('.json.failed'))
|
||||
except OSError:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.error(f"Error scanning chat snapshots: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user