fix login error

This commit is contained in:
rustdesk
2023-06-22 22:33:54 +08:00
parent ac8fc71b3b
commit 5831db260f
2 changed files with 4 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ class UserModel {
try {
return json.decode(userInfo);
} catch (e) {
debugPrint('Failed to get local user info, json decode "$userInfo": $e');
debugPrint('Failed to get local user info "$userInfo": $e');
}
return null;
}
@@ -133,6 +133,9 @@ class UserModel {
if (resp.statusCode != 200) {
throw RequestException(resp.statusCode, body['error'] ?? '');
}
if (body['error'] != null) {
throw RequestException(0, body['error']);
}
return getLoginResponseFromAuthBody(body);
}