JsonRpcError decoding to include message (#1336)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
CJ Hare 6 years ago committed by GitHub
parent 4f6a26828d
commit a5e4b8e3fd
  1. 2
      ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/response/JsonRpcError.java

@ -118,7 +118,7 @@ public enum JsonRpcError {
public static JsonRpcError fromJson(
@JsonProperty("code") final int code, @JsonProperty("message") final String message) {
for (final JsonRpcError error : JsonRpcError.values()) {
if (error.getCode() == code) {
if (error.code == code && error.message.equals(message)) {
return error;
}
}

Loading…
Cancel
Save