mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
api/youtube: expect errorInfo to not be json
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
This commit is contained in:
parent
a918b12387
commit
3f6dd4fced
@ -165,7 +165,8 @@ export default async function (o) {
|
|||||||
info = await yt.getBasicInfo(o.id, innertubeClient);
|
info = await yt.getBasicInfo(o.id, innertubeClient);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e?.info) {
|
if (e?.info) {
|
||||||
const errorInfo = JSON.parse(e?.info);
|
let errorInfo;
|
||||||
|
try { errorInfo = JSON.parse(e?.info); } catch {}
|
||||||
|
|
||||||
if (errorInfo?.reason === "This video is private") {
|
if (errorInfo?.reason === "This video is private") {
|
||||||
return { error: "content.video.private" };
|
return { error: "content.video.private" };
|
||||||
|
Loading…
Reference in New Issue
Block a user