diff --git a/autoendpoint/src/db/client.rs b/autoendpoint/src/db/client.rs index f00b31f9f..4222d834d 100644 --- a/autoendpoint/src/db/client.rs +++ b/autoendpoint/src/db/client.rs @@ -166,8 +166,7 @@ impl DbClient { /// Store a single message pub async fn store_message(&self, uaid: Uuid, message: Notification) -> DbResult<()> { let put_item = PutItemInput { - item: serde_dynamodb::to_hashmap(&DynamoDbNotification::from_notif(&uaid, message)) - .unwrap(), + item: serde_dynamodb::to_hashmap(&DynamoDbNotification::from_notif(&uaid, message))?, table_name: self.message_table.clone(), ..Default::default() }; diff --git a/autoendpoint/src/db/error.rs b/autoendpoint/src/db/error.rs index 8338d3f71..ddbfc5898 100644 --- a/autoendpoint/src/db/error.rs +++ b/autoendpoint/src/db/error.rs @@ -19,6 +19,6 @@ pub enum DbError { #[error("Database error while performing DeleteItem")] DeleteItem(#[from] RusotoError), - #[error("Error while deserializing database response: {0}")] - Deserialize(#[from] serde_dynamodb::Error), + #[error("Error while performing (de)serialization: {0}")] + Serialization(#[from] serde_dynamodb::Error), }