Skip to content

Transcript metrics silently return None on file errors #39

@mriechers

Description

@mriechers

Bug

calculate_transcript_metrics_from_file() in api/routers/queue.py catches all exceptions (including PermissionError, FileNotFoundError) and returns (None, None) without surfacing the error to the job record. Jobs are created with duration_minutes=None and word_count=None with no indication of why.

Impact

  • Jobs missing metrics can't trigger duration-based features (e.g., timestamp phase for 30+ min content)
  • Cost estimation is impossible without word count
  • No way to distinguish "metrics not yet calculated" from "metrics failed to calculate"

Suggested Fix

  • Log a warning with the specific error type
  • Consider storing a metrics_error field, or at minimum populating error_message on the job
  • Differentiate between "file not found" (queue-time error) and "parse failure" (data quality issue)

Location

api/routers/queue.py:43-73calculate_transcript_metrics_from_file()

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-discoveredDiscovered by an AI agent during workpriority: lowEnhancement, nice-to-havetype: bugSomething is not working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions