mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Catch failed references index request (#18274)
GitOrigin-RevId: 96063835056a39d85a57a77c0c7f71ce8243e6b9
This commit is contained in:
parent
9d6754f546
commit
e8a5f8f056
1 changed files with 8 additions and 2 deletions
|
@ -19,6 +19,7 @@ import { ReactScopeValueStore } from '@/features/ide-react/scope-value-store/rea
|
||||||
import { useFileTreeData } from '@/shared/context/file-tree-data-context'
|
import { useFileTreeData } from '@/shared/context/file-tree-data-context'
|
||||||
import { findDocEntityById } from '@/features/ide-react/util/find-doc-entity-by-id'
|
import { findDocEntityById } from '@/features/ide-react/util/find-doc-entity-by-id'
|
||||||
import { IdeEvents } from '@/features/ide-react/create-ide-event-emitter'
|
import { IdeEvents } from '@/features/ide-react/create-ide-event-emitter'
|
||||||
|
import { debugConsole } from '@/utils/debugging'
|
||||||
|
|
||||||
type References = {
|
type References = {
|
||||||
keys: string[]
|
keys: string[]
|
||||||
|
@ -74,9 +75,14 @@ export const ReferencesProvider: FC = ({ children }) => {
|
||||||
body: {
|
body: {
|
||||||
shouldBroadcast,
|
shouldBroadcast,
|
||||||
},
|
},
|
||||||
}).then((response: IndexReferencesResponse) => {
|
})
|
||||||
|
.then((response: IndexReferencesResponse) => {
|
||||||
storeReferencesKeys(response.keys, true)
|
storeReferencesKeys(response.keys, true)
|
||||||
})
|
})
|
||||||
|
.catch(error => {
|
||||||
|
// allow the request to fail
|
||||||
|
debugConsole.error(error)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
[projectId, storeReferencesKeys]
|
[projectId, storeReferencesKeys]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue