Skip to content

Commit ea3a3da

Browse files
authored
fix: improve error for insufficient blob data columns (#8595)
Closes #8569 Updates the HTTP API error when the node cannot reconstruct blobs due to "Insufficient data columns". Changes the response from 500 Internal Server Error to 400 Bad Request and adds a hint to run with --supernode or --semi-supernode. Co-Authored-By: Andrurachi <andruvrch@gmail.com>
1 parent ea811d6 commit ea3a3da

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

beacon_node/http_api/src/block_id.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,9 @@ impl BlockId {
483483
},
484484
)
485485
} else {
486-
Err(warp_utils::reject::custom_server_error(format!(
487-
"Insufficient data columns to reconstruct blobs: required {num_required_columns}, but only {num_found_column_keys} were found."
486+
Err(warp_utils::reject::custom_bad_request(format!(
487+
"Insufficient data columns to reconstruct blobs: required {num_required_columns}, but only {num_found_column_keys} were found. \
488+
You may need to run the beacon node with --supernode or --semi-supernode."
488489
)))
489490
}
490491
}

beacon_node/http_api/tests/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,8 +1970,8 @@ impl ApiTester {
19701970
.await
19711971
{
19721972
Ok(result) => panic!("Full node are unable to return blobs post-Fulu: {result:?}"),
1973-
// Post-Fulu, full nodes don't store blobs and return error 500
1974-
Err(e) => assert_eq!(e.status().unwrap(), 500),
1973+
// Post-Fulu, full nodes don't store blobs and return error 400 (Bad Request)
1974+
Err(e) => assert_eq!(e.status().unwrap(), 400),
19751975
};
19761976

19771977
self

0 commit comments

Comments
 (0)