diff --git a/src/morethantext/mod.rs b/src/morethantext/mod.rs index 81de5b9..98157e9 100644 --- a/src/morethantext/mod.rs +++ b/src/morethantext/mod.rs @@ -162,7 +162,10 @@ mod mtt { let output = mtt2.commit(store2).await; match output { Ok(_) => assert!(false, "Should have returned an error"), - Err(_) => (), + Err(err) => match err.code { + ErrorCode::DuplicateDatabase(_) => (), + _ => assert!(false, "{:?} is not ErrorCode::DuplicateDatabase", err.code), + }, } } }