diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index 338544a54c..f2f4f6cbf0 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.28.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.29.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/silkworm/rpc/commands/debug_api.cpp b/silkworm/rpc/commands/debug_api.cpp index d885145e81..1782e7a68c 100644 --- a/silkworm/rpc/commands/debug_api.cpp +++ b/silkworm/rpc/commands/debug_api.cpp @@ -708,7 +708,7 @@ Task DebugRpcApi::handle_debug_get_raw_block(const nlohmann::json& request reply = make_json_content(request, silkworm::to_hex(encoded_block, true)); } catch (const std::invalid_argument& iv) { SILK_ERROR << "exception: " << iv.what() << " processing request: " << request.dump(); - reply = make_json_error(request, kInvalidParams, iv.what()); + reply = make_json_error(request, kServerError, iv.what()); } catch (const std::exception& e) { SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); reply = make_json_error(request, kInternalError, e.what()); @@ -740,14 +740,14 @@ Task DebugRpcApi::handle_debug_get_raw_header(const nlohmann::json& reques const auto block_hash = co_await chain_storage->read_canonical_header_hash(block_num); const auto header = co_await chain_storage->read_header(block_num, block_hash->bytes); if (!header) { - throw std::invalid_argument("header " + std::to_string(block_num) + " not found"); + throw std::invalid_argument("header not found"); } Bytes encoded_header; rlp::encode(encoded_header, *header); reply = make_json_content(request, silkworm::to_hex(encoded_header, true)); } catch (const std::invalid_argument& iv) { SILK_ERROR << "exception: " << iv.what() << " processing request: " << request.dump(); - reply = make_json_error(request, kInvalidParams, iv.what()); + reply = make_json_error(request, kServerError, iv.what()); } catch (const std::exception& e) { SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); reply = make_json_error(request, kInternalError, e.what()); @@ -783,7 +783,7 @@ Task DebugRpcApi::handle_debug_get_raw_transaction(const nlohmann::json& r reply = make_json_content(request, silkworm::to_hex(rlp, true)); } catch (const std::invalid_argument& iv) { SILK_WARN << "invalid_argument: " << iv.what() << " processing request: " << request.dump(); - reply = make_json_error(request, kInvalidParams, iv.what()); + reply = make_json_error(request, kServerError, iv.what()); } catch (const std::exception& e) { SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); reply = make_json_error(request, kInternalError, e.what());