mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +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;
|
||||
|
||||
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);
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue