Update useConnection.ts
This commit is contained in:
@@ -225,8 +225,13 @@ export function useConnection({
|
|||||||
if (shouldRetry) {
|
if (shouldRetry) {
|
||||||
return connect(undefined, retryCount + 1);
|
return connect(undefined, retryCount + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error instanceof SseError && error.code === 401) {
|
||||||
|
// Don't set error state if we're about to redirect for auth
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
const capabilities = client.getServerCapabilities();
|
const capabilities = client.getServerCapabilities();
|
||||||
setServerCapabilities(capabilities ?? null);
|
setServerCapabilities(capabilities ?? null);
|
||||||
|
|||||||
Reference in New Issue
Block a user