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,11 +82,18 @@ export const setEventListeners = (arg: SetEventListenersArg) => {
socket.on('connect_error', (error) => { socket.on('connect_error', (error) => {
if (error && error.message) { if (error && error.message) {
dispatch( const data: string | undefined = (error as any).data;
addToast( if (data === 'ERR_UNAUTHENTICATED') {
makeToast({ title: error.message, status: 'error', duration: 10000 }) dispatch(
) addToast(
); makeToast({
title: error.message,
status: 'error',
duration: 10000,
})
)
);
}
} }
}); });