Skip to content

Commit

Permalink
throw web3client error directly
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Oct 2, 2024
1 parent 58bbaa8 commit 868eebe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ public SafeFuture<List<BlobAndProof>> execute(final JsonRpcRequestParams params)
"Response {}(blobVersionedHashes={}) -> {}",
getVersionedName(),
blobVersionedHashes,
blobsAndProofs))
.exceptionally(
throwable -> {
throw new UnsupportedOperationException(
String.format(
"Call to engineGetBlobsV1 failed. %s", throwable.getCause().getMessage()));
});
blobsAndProofs));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import tech.pegasys.teku.ethereum.executionclient.ExecutionEngineClient;
import tech.pegasys.teku.ethereum.executionclient.response.InvalidRemoteResponseException;
import tech.pegasys.teku.ethereum.executionclient.schema.BlobAndProofV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
Expand Down Expand Up @@ -99,10 +100,9 @@ public void shouldReturnFailedExecutionWhenEngineClientRequestFails() {
assertThat(jsonRpcMethod.execute(params))
.failsWithin(1, TimeUnit.SECONDS)
.withThrowableOfType(ExecutionException.class)
.withRootCauseInstanceOf(UnsupportedOperationException.class)
.withRootCauseInstanceOf(InvalidRemoteResponseException.class)
.withMessageContaining(
"Call to engineGetBlobsV1 failed. Invalid remote response from the execution client: %s",
errorResponseFromClient);
"Invalid remote response from the execution client: %s", errorResponseFromClient);
}

@Test
Expand Down

0 comments on commit 868eebe

Please sign in to comment.