Skip to content

Commit

Permalink
Revise error to make it clear that a _published_ transcript is required
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Mar 14, 2024
1 parent 690c964 commit 419de56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lms/views/api/canvas_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def via_url(request):
transcript_url = svc.get_transcript_url(media_id)

if not transcript_url:
raise HTTPBadRequest("This video does not have a transcript")
raise HTTPBadRequest("This video does not have a published transcript")

return {
"via_url": via_video_url(request, canonical_url, download_url, transcript_url)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lms/views/api/canvas_studio_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_it_raises_if_transcript_not_available(
canvas_studio_service.get_transcript_url.return_value = None

with pytest.raises(
HTTPBadRequest, match="This video does not have a transcript"
HTTPBadRequest, match="This video does not have a published transcript"
):
views.via_url(pyramid_request)

Expand Down

0 comments on commit 419de56

Please sign in to comment.