filter our websocket errors (#3382)

Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
This commit is contained in:
Mary Hipp Rogers
2023-05-10 21:58:40 -04:00
committed by GitHub
parent e0d6946b6b
commit b0c41b4828

View File

@ -82,12 +82,19 @@ export const setEventListeners = (arg: SetEventListenersArg) => {
socket.on('connect_error', (error) => { socket.on('connect_error', (error) => {
if (error && error.message) { if (error && error.message) {
const data: string | undefined = (error as any).data;
if (data === 'ERR_UNAUTHENTICATED') {
dispatch( dispatch(
addToast( addToast(
makeToast({ title: error.message, status: 'error', duration: 10000 }) makeToast({
title: error.message,
status: 'error',
duration: 10000,
})
) )
); );
} }
}
}); });
/** /**