private JsonArray getRequestBodyAsJsonArray(final RoutingContext ctx) {
    final JsonArray batchJsonRequest = ctx.get(ContextKey.REQUEST_BODY_AS_JSON_ARRAY.name());
    lazyTraceLogger(batchJsonRequest::toString);
    return batchJsonRequest;
  }
Creates an error response for an invalid request.

@return an error response.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/handlers/JsonRpcArrayExecutor.java