From c452add439a6319bb090ae756467779ef86f750c Mon Sep 17 00:00:00 2001 From: Bob Ong Date: Thu, 27 Jun 2024 15:41:22 +0800 Subject: [PATCH] [debug] Add new error print into log when JSONRPCClient request failed --- .../java/org/starcoin/api/JsonRPCClient.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/starcoin/api/JsonRPCClient.java b/src/main/java/org/starcoin/api/JsonRPCClient.java index 00a7503..2f7de19 100644 --- a/src/main/java/org/starcoin/api/JsonRPCClient.java +++ b/src/main/java/org/starcoin/api/JsonRPCClient.java @@ -62,8 +62,9 @@ protected T getObject(JSONRPC2Session session, String method, List param logger.warn("get object result is null, method:" + method); } } else { - logger.error("get object array error, method: {}, class: {}, error: {}", - method, + logger.error("getObject error, url:{}, request:{}, class: {}, error: {}", + session.getURL(), + request, clazz, response.getError() ); @@ -94,8 +95,9 @@ protected T getObjectParseJackson(JSONRPC2Session session, String method, List pa logger.warn("get sub object result is null, method:" + method); } } else { - logger.error("get sub object array error, method: {}, class: {}, error: {}", - method, + logger.error("getSubObject error, url:{}, request:{}, class: {}, error: {}", + session.getURL(), + request, clazz, response.getError() ); @@ -162,8 +165,9 @@ protected List getObjectArray(JSONRPC2Session session, String method, List