mirror of
https://github.com/imputnet/cobalt.git
synced 2026-11-03 00:04:55 +00:00
api: update error codes in services, add more error codes where needed
This commit is contained in:
parent
c698d272a1
commit
05abf9ad3e
21 changed files with 263 additions and 141 deletions
|
|
@ -3,9 +3,9 @@ export default async function(obj) {
|
|||
.then(r => r.status === 200 ? r.json() : false)
|
||||
.catch(() => {});
|
||||
|
||||
if (!video) return { error: 'ErrorEmptyDownload' };
|
||||
if (!video) return { error: "fetch.empty" };
|
||||
|
||||
let best = video.files['mp4-mobile'];
|
||||
let best = video.files["mp4-mobile"];
|
||||
if (video.files.mp4 && (obj.isAudioOnly || obj.quality === "max" || obj.quality >= 720)) {
|
||||
best = video.files.mp4;
|
||||
}
|
||||
|
|
@ -18,5 +18,5 @@ export default async function(obj) {
|
|||
title: video.title
|
||||
}
|
||||
}
|
||||
return { error: 'ErrorEmptyDownload' }
|
||||
return { error: "fetch.fail" }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue