Skip to content
5 changes: 2 additions & 3 deletions sgl-router/src/data_connector/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl PostgresConversationStorage {
}

async fn initialize_schema(store: PostgresStore) -> Result<(), ConversationStorageError> {
let client = store.pool.get().await.unwrap();
let client = store.pool.get().await.map_err(|e| ConversationStorageError::StorageError(e.to_string()))?;
client
.batch_execute(
"
Expand All @@ -79,8 +79,7 @@ impl PostgresConversationStorage {
metadata JSON
);",
)
.await
.unwrap();
.await.map_err(|e| ConversationStorageError::StorageError(e.to_string()))?;

Ok(())
}
Expand Down
Loading