-
Notifications
You must be signed in to change notification settings - Fork 14
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
Display better error if Canvas Studio video cannot be used with Via #6233
Conversation
1066246
to
d5b59fb
Compare
5435dc4
to
781ad75
Compare
Display a more helpful error in the case where a download URL cannot be obtained for a Canvas Studio video because it is hosted in YouTube or Vimeo.
781ad75
to
ba00bc0
Compare
hosted on YouTube or Vimeo cannot be used. | ||
</p> | ||
</ErrorModal> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something slightly confusing about these error messages is the fact that what you see here is not the entire message. Instead the server-provided message is shown at the top, and the children of the ErrorModal
are shown underneath.
For some of these errors, the server-side response includes only a code, for others there is a code and a message. Here I followed the pattern of those errors which include a short summary in the response, and then include extra details as ErrorModal
children.
If we want to translate these error messages in future, then we'll need to have them all in one place though.
raise HTTPBadRequest("Unable to get Canvas Studio media ID") | ||
raise CanvasStudioLaunchError( | ||
"canvas_studio_media_not_found", "Unable to get Canvas Studio media ID" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This particular error should never happen unless the document URL got edited on Canvas's side or we screwed up when generating it. However there is another related error which could happen, which is if the video gets removed in Canvas. I've used an error code which reflects that more general case.
Display a more helpful error in the case where a download URL cannot be obtained for a Canvas Studio video because it is hosted in YouTube or Vimeo. At the same time, also improve the presentation of the error when the video doesn't have a transcript.
The errors look like this:
Fixes #6231
[1] See https://hypothes-is.slack.com/archives/C1MA4E9B9/p1714472977336609