Log error when a JSON decode problem is encountered (#1278)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
CJ Hare 6 years ago committed by GitHub
parent 6e66e16a62
commit e8d87e43e4
  1. 3
      ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcHttpService.java

@ -454,6 +454,9 @@ public class JsonRpcHttpService {
} catch (final InvalidJsonRpcParameters e) {
LOG.debug(e);
return errorResponse(id, JsonRpcError.INVALID_PARAMS);
} catch (final RuntimeException e) {
LOG.debug(e);
return errorResponse(id, JsonRpcError.INTERNAL_ERROR);
}
} else {
return unauthorizedResponse(id, JsonRpcError.UNAUTHORIZED);

Loading…
Cancel
Save