feat: add error handling to player core functions

This commit is contained in:
2026-06-16 14:00:38 +02:00
committed by Milas Holsting
parent 3a1a2129d9
commit 2a8294c405
9 changed files with 45 additions and 22 deletions

View File

@@ -71,7 +71,8 @@ export const saveProgress = async (
seconds: savedTime,
};
} catch (e) {
console.warn("Progress save failed:", e);
console.error("progress save failed:", e);
throw e;
}
})();
@@ -113,7 +114,9 @@ export const markEpisodeTransition = (episodeNumber: number): void => {
headers: { "Content-Type": "application/json" },
keepalive: true,
body: payload,
}).catch(() => undefined);
}).catch((error) => {
console.debug("failed to save progress:", error);
});
}
};