api/cookie: warn if writing updated cookies fails

This commit is contained in:
jj 2024-11-26 13:52:20 +00:00
parent 3d95361c09
commit 00ac025235
No known key found for this signature in database

View file

@ -23,8 +23,10 @@ function writeChanges(cookiePath) {
dirty = false;
const cookieData = JSON.stringify({ ...cookies, ...invalidCookies }, null, 4);
writeFile(cookiePath, cookieData).catch(() => {
clearInterval(intervalId)
writeFile(cookiePath, cookieData).catch((e) => {
console.warn(`${Yellow('[!]')} failed writing updated cookies to storage`);
console.warn(e);
clearInterval(intervalId);
})
}