fix(database): respect Workers PBKDF2 iteration limit
This commit is contained in:
1 parent
9862348d70
commit
349ac4fc87
15 files changed
+26
-14
No files matched your search
+3
-1
@@ -12,7 +12,9 @@
|
||||
'content-type': 'application/json', ...(session ? { 'x-lifeos-admin-session': session } : {}), ...options.headers
|
||||
}
|
||||
});
|
||||
const result = await response.json();
|
||||
let result;
|
||||
try { result = await response.json(); }
|
||||
catch { throw new Error(text('unexpectedResponse')); }
|
||||
if (response.status === 401 && !['login', 'setup', 'password'].includes(path)) { session = null; expiresAt = 0; error = text('sessionExpired'); render(current()); }
|
||||
if (!response.ok) throw new Error(result.error || text('requestFailed'));
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user