From d3c20ffa9decf22a351ac0b59162f19c4660948c Mon Sep 17 00:00:00 2001 From: int88 Date: Tue, 28 Mar 2023 22:07:05 +0000 Subject: [PATCH] improve error message (#4141) ## Issue Addressed NA ## Proposed Changes Not use magic number directly in the error message. ## Additional Info NA --- beacon_node/http_api/src/attestation_performance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/http_api/src/attestation_performance.rs b/beacon_node/http_api/src/attestation_performance.rs index ca68d4d04..3e7d8d5e3 100644 --- a/beacon_node/http_api/src/attestation_performance.rs +++ b/beacon_node/http_api/src/attestation_performance.rs @@ -77,8 +77,8 @@ pub fn get_attestation_performance( // query is within permitted bounds to prevent potential OOM errors. if (end_epoch - start_epoch).as_usize() > MAX_REQUEST_RANGE_EPOCHS { return Err(custom_bad_request(format!( - "end_epoch must not exceed start_epoch by more than 100 epochs. start: {}, end: {}", - query.start_epoch, query.end_epoch + "end_epoch must not exceed start_epoch by more than {} epochs. start: {}, end: {}", + MAX_REQUEST_RANGE_EPOCHS, query.start_epoch, query.end_epoch ))); }