mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-04 12:12:21 +01:00
fix(email): propagate preflight safety failure across all mailbox groups
- Propagate preflight HTTPException(status_code=502) regardless of whether other mailbox groups exported messages into the temporary ZIP - Guarantee temporary file cleanup via SpooledTemporaryFile.close() on preflight failure - Preserve partial success (HTTP 200) for genuinely missing mail - Add executable tests for multi-group preflight failure orderings, missing mail, and zero body fetches
This commit is contained in:
@@ -4567,9 +4567,10 @@ def setup_email_routes():
|
||||
skipped += remaining_rows
|
||||
logger.warning("Bulk email export skipped mailbox folder=%s account=%s count=%s: %s", folder, account_id, remaining_rows, exc)
|
||||
|
||||
if preflight_error is not None:
|
||||
raise preflight_error
|
||||
|
||||
if exported <= 0:
|
||||
if preflight_error is not None:
|
||||
raise preflight_error
|
||||
raise HTTPException(status_code=404, detail="No selected emails could be exported")
|
||||
|
||||
spooled_file.seek(0)
|
||||
|
||||
Reference in New Issue
Block a user