improve error handling from gomuks
This commit is contained in:
parent
19c9479539
commit
2a4106d941
1 changed files with 4 additions and 1 deletions
|
|
@ -160,7 +160,10 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
calloc.free(bufferPointer);
|
calloc.free(bufferPointer);
|
||||||
|
|
||||||
final json = response.buf.toJson();
|
final json = response.buf.toJson();
|
||||||
if (json is String) throw json;
|
if (response.command.cast<Utf8>().toDartString() == "error") {
|
||||||
|
throw json;
|
||||||
|
}
|
||||||
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue