mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor: remove singleton db (#4208)
* refactor: remove singleton db * chore: fix warning * chore: fix warning * chore: update test * chore: only resotre or backup when init call * test: fix * test: fix * test: fix * fix: timeout notification * chore: rename * chore: rename * chore: disable test * chore: remove log * chore: remove log * chore: add log * chore: rename test functions * chore: add test asset * chore: bump client api * chore: disable some tests
This commit is contained in:
@ -262,6 +262,9 @@ pub enum ErrorCode {
|
||||
|
||||
#[error("rocksdb internal error")]
|
||||
RocksdbInternal = 87,
|
||||
|
||||
#[error("Local version not support")]
|
||||
LocalVersionNotSupport = 88,
|
||||
}
|
||||
|
||||
impl ErrorCode {
|
||||
|
@ -59,6 +59,10 @@ impl FlowyError {
|
||||
self.code == ErrorCode::UserUnauthorized || self.code == ErrorCode::RecordNotFound
|
||||
}
|
||||
|
||||
pub fn is_local_version_not_support(&self) -> bool {
|
||||
self.code == ErrorCode::LocalVersionNotSupport
|
||||
}
|
||||
|
||||
static_flowy_error!(internal, ErrorCode::Internal);
|
||||
static_flowy_error!(record_not_found, ErrorCode::RecordNotFound);
|
||||
static_flowy_error!(workspace_name, ErrorCode::WorkspaceNameInvalid);
|
||||
@ -105,6 +109,7 @@ impl FlowyError {
|
||||
static_flowy_error!(collab_not_sync, ErrorCode::CollabDataNotSync);
|
||||
static_flowy_error!(server_error, ErrorCode::InternalServerError);
|
||||
static_flowy_error!(not_support, ErrorCode::NotSupportYet);
|
||||
static_flowy_error!(local_version_not_support, ErrorCode::LocalVersionNotSupport);
|
||||
}
|
||||
|
||||
impl std::convert::From<ErrorCode> for FlowyError {
|
||||
|
Reference in New Issue
Block a user