mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +00:00
[scraper] improves nyaapantsu printed error
This commit is contained in:
parent
44d1ac2b82
commit
a1a3fdba61
1 changed files with 2 additions and 2 deletions
|
|
@ -25,8 +25,8 @@ function torrent(torrentId) {
|
|||
return pantsu.infoRequest(torrentId)
|
||||
.then(result => parseTorrent(result))
|
||||
.catch(error => {
|
||||
if (error.statusCode && error.statusCode === 404) {
|
||||
return Promise.reject(new Error(`404: [${torrentId}] not found on NyaaPantsu`));
|
||||
if (error.statusCode && error.statusCode >= 400) {
|
||||
return Promise.reject(new Error(`${error.statusCode}: [${torrentId}] failed retrieval on NyaaPantsu`));
|
||||
}
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue