mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-10 22:56:28 +00:00
replace unwraps with correct error
This commit is contained in:
@ -3,6 +3,8 @@ use std::error::Error;
|
||||
|
||||
use meilisearch_error::{Code, ErrorCode};
|
||||
|
||||
use crate::index_controller::update_file_store::UpdateFileStoreError;
|
||||
|
||||
pub type Result<T> = std::result::Result<T, UpdateLoopError>;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
@ -42,7 +44,8 @@ internal_error!(
|
||||
UpdateLoopError: heed::Error,
|
||||
std::io::Error,
|
||||
serde_json::Error,
|
||||
tokio::task::JoinError
|
||||
tokio::task::JoinError,
|
||||
UpdateFileStoreError
|
||||
);
|
||||
|
||||
impl ErrorCode for UpdateLoopError {
|
||||
|
@ -231,7 +231,7 @@ impl UpdateLoop {
|
||||
builder.add_documents(documents).unwrap();
|
||||
builder.finish().unwrap();
|
||||
|
||||
file.persist();
|
||||
file.persist()?;
|
||||
|
||||
Ok(uuid)
|
||||
})
|
||||
|
Reference in New Issue
Block a user