Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change description, details and HTTP status for TranscriptDisabled and other errors fetching YouTube transcripts #1044

Open
robertknight opened this issue Jul 3, 2023 · 0 comments

Comments

@robertknight
Copy link
Member

robertknight commented Jul 3, 2023

There are several issues with the error messages for YouTube transcripts that the backend returns to the frontend.

  • We have seen that the Python library we are using to fetch transcripts can report a TranscriptDisabled error in cases where this error code is misleading. For example we've seen it for long videos for which a transcript has not yet been generated, and videos with no sound.
  • The backend reports an HTTP 500 status, which parts of our monitoring will interpret as a backend failure, even though this is a "normal" failure.
  • The "details" message is the one from the underlying library, which tells users to file bug reports on the library's GitHub project. We don't want to send our users there. Instead the reports should go to us initially.

From a discussion on Slack we agreed to:

  • Change the status code for these errors from 500 to 4xx (TBD: Also apply to other errors? I suggest we do.)
  • Replace the error response's title with something generic for TranscriptDisabled's. I suggest "Transcript not available"
  • Replace the error response's detail with something generic or just remove it

So far the errors we've seen have all had a TranscriptDisabled code, but see https://github.com/jdepoix/youtube-transcript-api/blob/master/youtube_transcript_api/_errors.py for other error codes we may encounter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants