diff --git a/services/blob/src/database.rs b/services/blob/src/database.rs
--- a/services/blob/src/database.rs
+++ b/services/blob/src/database.rs
@@ -1,4 +1,3 @@
-use anyhow::{anyhow, Context, Result};
use aws_sdk_dynamodb::{
model::AttributeValue, output::GetItemOutput, Error as DynamoDBError,
};
@@ -47,7 +46,7 @@
// Blob item
- pub async fn put_blob_item(&self, blob_item: BlobItem) -> Result<()> {
+ pub async fn put_blob_item(&self, blob_item: BlobItem) -> Result<(), Error> {
let item = HashMap::from([
(
BLOB_TABLE_BLOB_HASH_FIELD.to_string(),
@@ -70,7 +69,7 @@
.set_item(Some(item))
.send()
.await
- .context("Failed to put blob item")?;
+ .map_err(|e| Error::AwsSdk(e.into()))?;
Ok(())
}
@@ -78,7 +77,7 @@
pub async fn find_blob_item(
&self,
blob_hash: &str,
- ) -> Result