api: update error codes in services, add more error codes where needed

This commit is contained in:
wukko
2024-08-20 21:10:37 +06:00
parent c698d272a1
commit 05abf9ad3e
21 changed files with 263 additions and 141 deletions

View File

@@ -23,7 +23,7 @@ export default async function({ id }) {
.then(r => r.status === 200 ? r.json() : false)
.catch(() => {});
if (!gql) return { error: 'ErrorEmptyDownload' };
if (!gql) return { error: "fetch.empty" };
const videoUrl = gql?.url;
@@ -35,5 +35,5 @@ export default async function({ id }) {
}
}
return { error: 'ErrorEmptyDownload' }
return { error: "fetch.empty" }
}