Skip to content

fix: return 404 instead of 502 when video has no caption tracks#6

Merged
shanehull merged 1 commit into
mainfrom
fix/no-captions-502
Jun 20, 2026
Merged

fix: return 404 instead of 502 when video has no caption tracks#6
shanehull merged 1 commit into
mainfrom
fix/no-captions-502

Conversation

@shanehull

Copy link
Copy Markdown
Owner

The "no caption tracks available" error from fetchCaptions was falling through to the default case in errorStatus(), returning 502 Bad Gateway. Cloudflare intercepts 502s and replaces the JSON response with its own error page.

Now matches "no caption tracks" alongside "no transcript found"404 Not Found, which Cloudflare passes through with the JSON body intact.

@shanehull shanehull self-assigned this Jun 20, 2026
@shanehull
shanehull merged commit bc62051 into main Jun 20, 2026
3 checks passed
@shanehull
shanehull deleted the fix/no-captions-502 branch June 20, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant