Fix "cast" exception. Handle result from external browser as object.
This commit is contained in:
parent
babb522f91
commit
3f75e03766
|
@ -182,8 +182,8 @@ public class ExternalBrowser implements AutoCloseable {
|
|||
if (future != null) {
|
||||
responseFutures.remove(msgid);
|
||||
if (json.has("result")) {
|
||||
LOG.debug("Future {} done", msgid);
|
||||
future.complete(json.getString("result"));
|
||||
LOG.debug("Future {} done. Result: {}", msgid, json.get("result"));
|
||||
future.complete(json.get("result"));
|
||||
} else if (json.has("error")) {
|
||||
LOG.debug("Future {} failed", msgid);
|
||||
future.completeExceptionally(new Exception(json.getJSONObject("error").toString()));
|
||||
|
|
Loading…
Reference in New Issue