add folder editor

This commit is contained in:
appflowy
2022-01-17 11:55:36 +08:00
parent 3eff006d6d
commit 7f1a0adf13
22 changed files with 548 additions and 211 deletions

View File

@ -1,5 +1,12 @@
use crate::FlowyError;
use flowy_collaboration::errors::ErrorCode;
impl std::convert::From<flowy_collaboration::errors::CollaborateError> for FlowyError {
fn from(error: flowy_collaboration::errors::CollaborateError) -> Self { FlowyError::internal().context(error) }
fn from(error: flowy_collaboration::errors::CollaborateError) -> Self {
match error.code {
ErrorCode::RecordNotFound => FlowyError::record_not_found().context(error.msg),
_ => FlowyError::internal().context(error.msg),
}
}
}

View File

@ -1,5 +1,5 @@
use crate::FlowyError;
impl std::convert::From<lib_ot::errors::OTError> for FlowyError {
fn from(error: lib_ot::errors::OTError) -> Self { FlowyError::internal().context(error) }
fn from(error: lib_ot::errors::OTError) -> Self { FlowyError::internal().context(error.msg) }
}