mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-02 20:18:29 +01:00
12 lines
437 B
TypeScript
12 lines
437 B
TypeScript
/**
|
|
* Cast load error classification. Kept dependency-free so it is unit-testable
|
|
* without pulling React Native modules into the test runtime.
|
|
*/
|
|
|
|
/** True when an error is a Cast "LOAD_FAILED" (status 2100) rejection. */
|
|
export const isLoadFailedError = (error: unknown): boolean => {
|
|
if (error == null) return false;
|
|
const message = error instanceof Error ? error.message : String(error);
|
|
return message.includes("2100");
|
|
};
|