-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
throw error if the videoID returned is different #3278
Conversation
d3ed16b
to
f527ca2
Compare
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.
[Don't mind my previous (now deleted) comment]
We should probably put something in info["error"] instead of rising an exception. I'm pretty sure that rising an exception for the wrong video ID will break sonner or later.
Also, if we raise something, We should raise an InfoException
(no trace) or just an Exception
. A BrokenTubeException
is used to give the name of a JSON object that we can't find.
EDIT: We can also create a dedicated VideoNotAvailableException
Then the user wouldn't have direct easy access to reporting the issue. Returning an info[error] means only a single message is displayed.
Ok for a |
Go for it, then! |
f527ca2
to
f47b674
Compare
Ok I got it, please review again. |
f47b674
to
85cb114
Compare
85cb114
to
389e491
Compare
Closes #3257