Skip to content

Commit 9358698

Browse files
authored
fix(code quality): Improve error for S3 upload in Batcher (#1014)
1 parent bc6f49d commit 9358698

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

batcher/aligned-batcher/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ impl Batcher {
10181018
&file_name,
10191019
)
10201020
.await
1021-
.map_err(|e| BatcherError::TaskCreationError(e.to_string()))?;
1021+
.map_err(|e| BatcherError::BatchUploadError(e.to_string()))?;
10221022

10231023
info!("Batch sent to S3 with name: {}", file_name);
10241024

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub enum BatcherError {
99
BatchVerifiedEventStreamError(String),
1010
EthereumSubscriptionError(String),
1111
SignatureError(SignatureError),
12+
BatchUploadError(String),
1213
TaskCreationError(String),
1314
ReceiptNotFoundError,
1415
TransactionSendError,
@@ -49,6 +50,9 @@ impl fmt::Debug for BatcherError {
4950
BatcherError::SignatureError(e) => {
5051
write!(f, "Message signature verification error: {}", e)
5152
}
53+
BatcherError::BatchUploadError(e) => {
54+
write!(f, "Uploading Batch was not successful: {}", e)
55+
}
5256
BatcherError::TaskCreationError(e) => {
5357
write!(f, "Task creation error: {}", e)
5458
}

0 commit comments

Comments
 (0)