Opened 15 years ago
Closed 15 years ago
#6428 closed patch (fixed)
tmdb.pl - Check for response before parsing
Reported by: | Owned by: | Anduin Withers | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | Plugin - MythVideo | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The attached patch checks the response before parsing it, providing a much more sensible error message when network (or server) errors occur.
Before the patch, the message is something like:
File does not exist: at ./tmdb.pl line 302
After the patch:
Unable to contact themoviedb.org while retrieving movie list, stopped at ./tmdb.pl line 328.
(or similar). I tested the patch with an /etc/hosts entry:
127.0.0.1 api.themoviedb.org
but haven't yet tested the patch with a real, live network/server issue. Still waiting for (another) one to occur.
Attachments (3)
Change History (4)
Changed 15 years ago by
Attachment: | mythplugins-6428-mythvideo-tmdb-check_response.patch added |
---|
Changed 15 years ago by
Attachment: | mythplugins-6428-mythvideo-tmdb-check_response.2.patch added |
---|
Changed 15 years ago by
Attachment: | mythplugins-6428-mythvideo-tmdb-check_response.3.patch added |
---|
Updated for recent changes to trunk.
Note: See
TracTickets for help on using
tickets.
Slightly prettier patch. Can check for !defined since MythVideoCommon?.pm's myth_url_get(), used by TMDBAPIRequest(), returns undef response for unsuccessful requests