logs-connect-fix

This commit is contained in:
Untone 2024-05-18 15:46:29 +03:00
parent ae90118045
commit 65b0667a26

View File

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