Skip to content

Commit ced922a

Browse files
committed
chore: improve error message for disabled verifiers
1 parent 1bbfcc5 commit ced922a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

batcher/aligned-batcher/src/types/errors.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub enum BatcherError {
1616
MaxRetriesReachedError,
1717
SerializationError(String),
1818
GasPriceError,
19+
DisabledVerifiersError(String),
1920
BatchCostTooHigh,
2021
WsSinkEmpty,
2122
AddressNotFoundInUserStates(Address),
@@ -90,6 +91,13 @@ impl fmt::Debug for BatcherError {
9091
"User with address {addr:?} was not found in Batcher user states cache"
9192
)
9293
}
94+
BatcherError::DisabledVerifiersError(reason) => {
95+
write!(
96+
f,
97+
"Error while trying to get disabled verifiers: {}",
98+
reason
99+
)
100+
}
93101
}
94102
}
95103
}

batcher/aligned/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,13 @@ async fn handle_submit_err(err: SubmitError, nonce_file: &str) {
547547
SubmitError::ProofQueueFlushed => {
548548
error!("Batch was reset. try resubmitting the proof");
549549
}
550-
SubmitError::InvalidProof => error!("Submitted proof is invalid"),
550+
SubmitError::InvalidProof(reason) => error!("Submitted proof is invalid: {}", reason),
551551
SubmitError::InsufficientBalance => {
552552
error!("Insufficient balance to pay for the transaction")
553553
}
554-
_ => {}
554+
_ => {
555+
error!("Unexpected error");
556+
}
555557
}
556558

557559
delete_file(nonce_file).unwrap_or_else(|e| {

0 commit comments

Comments
 (0)