Pot issue fix (#1233)

## Description:
Fixes #1232 
Fixes #1231 

Add handle's 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:
dovg
This commit is contained in:
tnhnblgl
2025-06-19 23:27:25 +03:00
committed by GitHub
parent 5895aa7882
commit bd4fe45056
2 changed files with 16 additions and 2 deletions
+8 -1
View File
@@ -92,7 +92,14 @@ export class LocalServer {
}
onMessage(message: string) {
const result = ClientMessageSchema.safeParse(JSON.parse(message));
let parsed;
try {
parsed = JSON.parse(message);
} catch (e) {
console.error("Failed to parse client message:", e);
return;
}
const result = ClientMessageSchema.safeParse(parsed);
if (!result.success) {
const error = z.prettifyError(result.error);
console.error("Error parsing client message", error);
+8 -1
View File
@@ -310,7 +310,14 @@ export class Transport {
onconnect();
};
this.socket.onmessage = (event: MessageEvent) => {
const result = ServerMessageSchema.safeParse(JSON.parse(event.data));
let parsed;
try {
parsed = JSON.parse(event.data);
} catch (e) {
console.error("Failed to parse server message:", e, event.data);
return;
}
const result = ServerMessageSchema.safeParse(parsed);
if (!result.success) {
const error = z.prettifyError(result.error);
console.error("Error parsing server message", error);