Handle external tool failures with actionable errors¶
uid: ISS-0014 status: BACKLOG priority: medium owner_role: REWORK estimate: TBD dependencies: [] risk: medium milestone: backlog
Category¶
REWORK
Evidence¶
src/filare/render/pdf.pydirectly callsweasyprint.HTML(...).render().write_pdf(...)without catchingImportError, missing file errors, orweasyprintruntime failures; users see stack traces with no hint to install system deps (Pango/fonts).- Graphviz rendering relies on the
graphvizPython package; whendotis missing or not on PATH,graphviz.backend.ExecutableNotFoundbubbles up with a raw trace. There is no Filare-side message pointing to Graphviz installation requirements.
Suggested Next Steps¶
- Wrap PDF generation in try/except to emit a concise message:
PDF generation failed: WeasyPrint/GTK/Pango not available or input HTML missing (<path>). Install system deps or drop format 'P'. - Detect
ExecutableNotFoundfrom Graphviz and rethrow a user-facingRuntimeErrorthat mentionsdot/Graphviz needs to be installed and on PATH (with a link to docs/README install section). - Add a minimal regression test that mocks missing Graphviz/WeasyPrint to assert the improved error strings (behavior unchanged except clearer messaging).