Merge branch 'dev' into feature/rating
All checks were successful
deploy / test (push) Successful in 2m56s
deploy / Update templates on Mailgun (push) Has been skipped

This commit is contained in:
Untone 2024-05-18 16:35:41 +03:00
commit f98bfa2d39

View File

@ -61,10 +61,10 @@ export const ConnectProvider = (props: { children: JSX.Element }) => {
if (response.ok && response.headers.get('content-type') === EventStreamContentType) { if (response.ok && response.headers.get('content-type') === EventStreamContentType) {
setConnected(true) setConnected(true)
} else if (response.status === 401) { } else if (response.status === 401) {
throw new Error('cannot connect to real-time updates') throw new Error('SSE: cannot connect to real-time updates')
} else { } else {
setRetried((r) => r + 1) setRetried((r) => r + 1)
throw new Error(`failed to connect ${retried()} times`) throw new Error(`SSE: failed to connect ${retried()} times`)
} }
}, },
onclose() { onclose() {