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:
Variet Worker
2026-04-10 16:33:02 +09:00
parent b88e75b075
commit e745744636
4 changed files with 29 additions and 11 deletions

6
bot.py
View File

@@ -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}")