[Update] Add an error notification that is when an invalid endpoint or message is received(mostly frontend side endpoint error handling bug).

This commit is contained in:
Sakamoto Shiina
2025-11-29 15:58:52 +09:00
parent 592149afed
commit 14a4a1ed99
2 changed files with 5 additions and 1 deletions

View File

@@ -241,6 +241,9 @@ export const _useBackendErrorHandling = () => {
default: default:
console.error(`Invalid endpoint or message: ${endpoint}\nmessage: ${message}\nresult: ${JSON.stringify(result)}`); console.error(`Invalid endpoint or message: ${endpoint}\nmessage: ${message}\nresult: ${JSON.stringify(result)}`);
showNotification_Error(
`An error occurred. Please contact the developers and restart VRCT. Error: Invalid endpoint or message: ${endpoint}\nmessage: ${message}\nresult: ${JSON.stringify(result)}`, { hide_duration: null }
);
return; return;
} }

View File

@@ -49,7 +49,8 @@ const useStartPython = () => {
}); });
command.stderr.on("data", line => { command.stderr.on("data", line => {
showNotification_Error( showNotification_Error(
`An error occurred. Please restart VRCT or contact the developers. The last line:${JSON.stringify(line)}`, { hide_duration: null }); `An error occurred. Please restart VRCT or contact the developers. The last line:${JSON.stringify(line)}`, { hide_duration: null }
);
console.error("stderr", line); console.error("stderr", line);
}); });
const backend_subprocess = await command.spawn(); const backend_subprocess = await command.spawn();