From 2a4106d94143bc80c033874e35bcd813e29db81a Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 14 Jul 2026 16:47:07 -0400 Subject: [PATCH] improve error handling from gomuks --- lib/controllers/client_controller.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/controllers/client_controller.dart b/lib/controllers/client_controller.dart index f04dd41..d888162 100644 --- a/lib/controllers/client_controller.dart +++ b/lib/controllers/client_controller.dart @@ -160,7 +160,10 @@ class ClientController extends AsyncNotifier { calloc.free(bufferPointer); final json = response.buf.toJson(); - if (json is String) throw json; + if (response.command.cast().toDartString() == "error") { + throw json; + } + return json; }