mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 21:29:12 +00:00
Merge branch 'master' into short-circuit-api-rate-limiter
This commit is contained in:
@@ -208,7 +208,10 @@ function pushDataToKhoj (regenerate = false) {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
if (error.response.status == 429) {
|
||||
if (error.code == 'ECONNREFUSED') {
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
if (win) win.webContents.send('update-state', state);
|
||||
} else if (error.response.status == 429) {
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
if (win) win.webContents.send('needsSubscription', true);
|
||||
if (win) win.webContents.send('update-state', state);
|
||||
|
||||
Reference in New Issue
Block a user