Skip to content

Commit

Permalink
handle http errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Oct 21, 2021
1 parent 7aec151 commit 7f8ace2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PlutoIPTV/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ const plutoIPTV = {
promises.push(
new Promise((resolve, reject) => {
request(url, function (err, code, raw) {
resolve(JSON.parse(raw));
if (err) {
reject(err);
} else {
resolve(JSON.parse(raw));
}
});
})
);
Expand Down

0 comments on commit 7f8ace2

Please sign in to comment.