Skip to content

Commit

Permalink
Log error when a JSON decode problem is encountered (hyperledger#1278)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
  • Loading branch information
CjHare authored Apr 15, 2019
1 parent 6e66e16 commit e8d87e4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ private JsonRpcResponse process(final JsonObject requestJson, final Optional<Use
} 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);
Expand Down

0 comments on commit e8d87e4

Please sign in to comment.