Skip to content

Commit

Permalink
fix(code quality): Improve error for S3 upload in Batcher (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatStiles authored Sep 24, 2024
1 parent bc6f49d commit 9358698
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion batcher/aligned-batcher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ impl Batcher {
&file_name,
)
.await
.map_err(|e| BatcherError::TaskCreationError(e.to_string()))?;
.map_err(|e| BatcherError::BatchUploadError(e.to_string()))?;

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

Expand Down
4 changes: 4 additions & 0 deletions batcher/aligned-batcher/src/types/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub enum BatcherError {
BatchVerifiedEventStreamError(String),
EthereumSubscriptionError(String),
SignatureError(SignatureError),
BatchUploadError(String),
TaskCreationError(String),
ReceiptNotFoundError,
TransactionSendError,
Expand Down Expand Up @@ -49,6 +50,9 @@ impl fmt::Debug for BatcherError {
BatcherError::SignatureError(e) => {
write!(f, "Message signature verification error: {}", e)
}
BatcherError::BatchUploadError(e) => {
write!(f, "Uploading Batch was not successful: {}", e)
}
BatcherError::TaskCreationError(e) => {
write!(f, "Task creation error: {}", e)
}
Expand Down

0 comments on commit 9358698

Please sign in to comment.