mirror of
https://github.com/wukko/cobalt.git
synced 2025-03-23 17:47:10 +01:00
api/cookie: warn if writing updated cookies fails
This commit is contained in:
parent
3d95361c09
commit
00ac025235
1 changed files with 4 additions and 2 deletions
|
@ -23,8 +23,10 @@ function writeChanges(cookiePath) {
|
||||||
dirty = false;
|
dirty = false;
|
||||||
|
|
||||||
const cookieData = JSON.stringify({ ...cookies, ...invalidCookies }, null, 4);
|
const cookieData = JSON.stringify({ ...cookies, ...invalidCookies }, null, 4);
|
||||||
writeFile(cookiePath, cookieData).catch(() => {
|
writeFile(cookiePath, cookieData).catch((e) => {
|
||||||
clearInterval(intervalId)
|
console.warn(`${Yellow('[!]')} failed writing updated cookies to storage`);
|
||||||
|
console.warn(e);
|
||||||
|
clearInterval(intervalId);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue