mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
This reverts commit c1006c18c3
.
This commit is contained in:
@ -260,23 +260,11 @@ pub enum ErrorCode {
|
||||
#[error("Cloud request payload too large")]
|
||||
CloudRequestPayloadTooLarge = 90,
|
||||
|
||||
#[error("IndexWriter failed to commit")]
|
||||
IndexWriterFailedCommit = 91,
|
||||
|
||||
#[error("Failed to open Index directory")]
|
||||
FailedToOpenIndexDir = 92,
|
||||
|
||||
#[error("Failed to parse query")]
|
||||
FailedToParseQuery = 93,
|
||||
|
||||
#[error("FolderIndexManager or its dependencies are unavailable")]
|
||||
FolderIndexManagerUnavailable = 94,
|
||||
|
||||
#[error("Workspace limit exceeded")]
|
||||
WorkspaceLimitExeceeded = 95,
|
||||
WorkspaceLimitExeceeded = 91,
|
||||
|
||||
#[error("Workspace member limit exceeded")]
|
||||
WorkspaceMemberLimitExeceeded = 96,
|
||||
WorkspaceMemberLimitExeceeded = 92,
|
||||
}
|
||||
|
||||
impl ErrorCode {
|
||||
|
@ -113,10 +113,6 @@ impl FlowyError {
|
||||
static_flowy_error!(server_error, ErrorCode::InternalServerError);
|
||||
static_flowy_error!(not_support, ErrorCode::NotSupportYet);
|
||||
static_flowy_error!(local_version_not_support, ErrorCode::LocalVersionNotSupport);
|
||||
static_flowy_error!(
|
||||
folder_index_manager_unavailable,
|
||||
ErrorCode::FolderIndexManagerUnavailable
|
||||
);
|
||||
}
|
||||
|
||||
impl std::convert::From<ErrorCode> for FlowyError {
|
||||
|
@ -24,6 +24,3 @@ mod cloud;
|
||||
|
||||
#[cfg(feature = "impl_from_url")]
|
||||
mod url;
|
||||
|
||||
#[cfg(feature = "impl_from_tantivy")]
|
||||
mod tantivy;
|
||||
|
@ -1,21 +0,0 @@
|
||||
use tantivy::{directory::error::OpenDirectoryError, query::QueryParserError, TantivyError};
|
||||
|
||||
use crate::{ErrorCode, FlowyError};
|
||||
|
||||
impl std::convert::From<TantivyError> for FlowyError {
|
||||
fn from(error: TantivyError) -> Self {
|
||||
FlowyError::new(ErrorCode::IndexWriterFailedCommit, error)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<OpenDirectoryError> for FlowyError {
|
||||
fn from(error: OpenDirectoryError) -> Self {
|
||||
FlowyError::new(ErrorCode::FailedToOpenIndexDir, error)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<QueryParserError> for FlowyError {
|
||||
fn from(error: QueryParserError) -> Self {
|
||||
FlowyError::new(ErrorCode::FailedToParseQuery, error)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user