Skip to content

Commit 7567954

Browse files
committed
Reduce docs connection attempts
1 parent 43777da commit 7567954

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ui/components/docs/docsDialog.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
let manifest: IDocsManifest
1919
let openPageUrl: Writable<string> = writable('/home')
20-
const maxAttempts = 10
20+
const maxAttempts = 2
2121
2222
async function load(attemptCount: number = 0) {
2323
manifest = await fetch(API)
@@ -28,12 +28,11 @@
2828
})
2929
.catch(err => {
3030
console.error(
31-
`Failed to fetch docs manifest. (Attempt ${attemptCount + 1})\n` + err.stack
31+
`Failed to fetch docs manifest. (Attempt ${attemptCount + 1})\n` + err.message
3232
)
3333
// retry
3434
if (attemptCount >= maxAttempts) {
3535
throw new Error(`Failed to fetch docs manifest after ${maxAttempts} attempts.`)
36-
return
3736
}
3837
void load(attemptCount + 1)
3938
})

0 commit comments

Comments
 (0)