mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
filter our websocket errors (#3382)
Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
This commit is contained in:
@ -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,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user