Skip to content

Silent KeyError in Illustration Progress Update #137

@CyberSecDef

Description

@CyberSecDef

Problem

In novelforge/routes/export.py lines 571-574:

try:
    progress_manager.update(token, {"illustration_token": illust_token})
except KeyError:
    pass

If the progress entry is deleted while illustrations are generating, the KeyError is silently swallowed. The illustration is saved to disk but never linked to the progress data.

Why It Matters

Disk space consumed with orphaned images the user cannot access from the UI.

Recommended Fix

Log a warning instead of silently passing:

except KeyError:
    logger.warning("Could not link illustration to novel (progress entry %s not found).", token)

Metadata

Metadata

Labels

bugSomething isn't workingpriority:mediumMedium priority

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions