diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcGrpcClient.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcGrpcClient.kt index 621948dd..9d83a093 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcGrpcClient.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcGrpcClient.kt @@ -95,8 +95,9 @@ class JsonRpcGrpcClient( metrics?.fails?.increment() Mono.error( RpcException( - RpcResponseError.CODE_UPSTREAM_CONNECTION_ERROR, - resp.errorMessage + resp.errorCode, + resp.errorMessage, + if (resp.errorData == null || resp.errorData.isEmpty()) null else resp.errorData ) ) }