Skip to content

fix(subtitles): treat missing public VTTs as benign and suppress Sentry noise #275

@rabble

Description

@rabble

Summary

A public video on /discovery/foryou returned 200 for the base MP4 but 422 for its derived subtitle VTT URL. The client currently treats subtitle CDN fetches as optional, but Sentry still records the 422 as an error-level production issue.

Production evidence

  • Sentry issue: JAVASCRIPT-REACT-2S
  • Count: 1 event / 1 user
  • First seen / last seen: 2026-04-20T00:26:25Z
  • Route: /discovery/foryou
  • Release: divine-web@2026-03-06
  • Latest failing asset URL from Sentry:
    • https://media.divine.video/f423713bd22dc6ff6e28cd1767a13a85cd4013397a592dbc55060808cf84824c/vtt

Live verification on 2026-04-25

  • https://media.divine.video/f423713bd22dc6ff6e28cd1767a13a85cd4013397a592dbc55060808cf84824c -> 200 (video/mp4)
  • https://media.divine.video/f423713bd22dc6ff6e28cd1767a13a85cd4013397a592dbc55060808cf84824c/vtt -> 422

So this is not just a gated-media auth failure. The video itself is public, but the derived subtitle endpoint is returning a hard error.

Relevant client code

Why this is a problem

  • Users may not notice because the client silently falls back to "no subtitles," but Sentry still records the failed request as a production error.
  • A 422 on an optional derived asset suggests either:
    • the media service is treating "no subtitle available" as a validation error instead of a benign miss, or
    • the web client is hitting the subtitle endpoint for hashes that should never advertise a VTT lookup path.

Expected behavior

  • Public videos without subtitles should resolve cleanly as "no subtitles" without a hard 422.
  • Optional subtitle asset misses should not create error-level Sentry issues.

Acceptance criteria

  • Public media.divine.video/{hash} videos do not produce 422 on optional subtitle fetches in normal playback.
  • The client and/or backend treats missing subtitles as a benign absence rather than a production error.
  • Sentry issue JAVASCRIPT-REACT-2S stops receiving new events after rollout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions