-
Notifications
You must be signed in to change notification settings - Fork 93
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
Handle FreeDB server errors gracefully #304
Conversation
In my repeated tests, I ended up upsetting freedb.org, which started issuing 502 errors. Those errors are not correctly caught by the program which just crashes with a backtrace. Instead, we handle those like any other API error, which can already be generated by perform_lookup (but not handled). The visible result for the user is that the CD is simply not found on FreeDB, an acceptable compromise, in my opinion. Closes: whipper-team#206
... which are all capitalized.
note that #206 was closed, but should be reopened before this is merged of course. :) |
Thanks for reporting this issue. I've reopened #206. Shouldn't we just handle the exception in |
The reason I did it this way was to catch the I was trying to keep things separate... |
That's true, although we're not not relying on a blindly imported freedb module (the code is already quite customised, just see fdeeed9). Almost 3 years have passed since the last update to that file in the upstream repository. |
On 2018-10-06 09:53:24, JoeLametta wrote:
> The problem then is we depend upon freedb-specific code: if they decide to switch to (say) requests to do network requests, our error-handling goes out the window.
That's true, although we're not not relying on a blindly imported freedb module (the code is already quite customised, just see fdeeed9). Almost 3 years have passed since the last update to that file in the upstream repository.
Anyway I'm not opposing to the way you've implemented the fix, just trying to clarify the situation. I'll wait for your reply then will probably proceed to merge this pull request as is right now. 😉
I don't really care either way... I just scratched an itch. Besides, all
this would ideally go away and be abstracted in an external libdiscid
right?
|
Don't know: it seems libdiscid only handles the computation of the IDs not the actual network communications with FreeDB or MusicBrainz (in whipper the former it's handled by the customised |
In my repeated tests, I ended up upsetting freedb.org, which started
issuing 502 errors. Those errors are not correctly caught by the
program which just crashes with a backtrace. Instead, we handle those
like any other API error, which can already be generated by
perform_lookup (but not handled).
The visible result for the user is that the CD is simply not found on
FreeDB, an acceptable compromise, in my opinion.
Closes: #206