diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/Response.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/Response.java index 4890db704a2..fcc02ee8f06 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/Response.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/Response.java @@ -67,7 +67,10 @@ public T getPayload() { } public String getErrorMessage() { - return errorMessage; + if (errorMessage != null) { + return errorMessage.strip(); + } + return null; } public boolean isSuccess() {