Skip to content

Commit

Permalink
[debug] Add new error print into log when JSONRPCClient request failed
Browse files Browse the repository at this point in the history
  • Loading branch information
welbon committed Jun 27, 2024
1 parent b6492c5 commit c452add
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/main/java/org/starcoin/api/JsonRPCClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ protected T getObject(JSONRPC2Session session, String method, List<Object> 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()
);
Expand Down Expand Up @@ -94,8 +95,9 @@ protected T getObjectParseJackson(JSONRPC2Session session, String method, List<O
logger.warn("get object parse jackson result is null, method:" + method);
}
} else {
logger.error("get get object parse jackson array error, method: {}, class: {}, error: {}",
method,
logger.error("getObjectParseJackson failed, url:{}, request:{}, class: {}, error: {}",
session.getURL(),
request,
clazz,
response.getError()
);
Expand Down Expand Up @@ -128,8 +130,9 @@ protected T getSubObject(JSONRPC2Session session, String method, List<Object> 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()
);
Expand Down Expand Up @@ -162,8 +165,9 @@ protected List<T> getObjectArray(JSONRPC2Session session, String method, List<Ob
logger.warn("get object result is null, method:" + method);
}
} else {
logger.error("get object array error, method: {}, class: {}, error: {}",
method,
logger.error("getObjectArray error, url:{}, request:{}, class: {}, error: {}",
session.getURL(),
request,
clazz,
response.getError()
);
Expand Down

0 comments on commit c452add

Please sign in to comment.