mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-30 19:54:16 -04:00
Prevent abort errors from behing printed
This commit is contained in:
parent
1dbee1d79f
commit
fed94eab1b
@ -85,6 +85,8 @@ export const queryFn = async <Data,>(
|
|||||||
signal: controller?.signal ?? context.signal,
|
signal: controller?.signal ?? context.signal,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (typeof e === "object" && e && "name" in e && e.name === "AbortError")
|
||||||
|
throw { errors: ["Aborted"] } as KyooErrors;
|
||||||
console.log("Fetch error", e, path);
|
console.log("Fetch error", e, path);
|
||||||
throw { errors: ["Could not reach Kyoo's server."] } as KyooErrors;
|
throw { errors: ["Could not reach Kyoo's server."] } as KyooErrors;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user