diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index 96fd4b2eec..5d9fc1645e 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -1512,7 +1512,6 @@ dependencies = [ "flowy-codegen", "flowy-derive", "flowy-sqlite", - "http-error-code", "lib-dispatch", "protobuf", "r2d2", @@ -2157,16 +2156,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-error-code" -version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Server?branch=refactor/appflowy_server#1ccd296de8530760d92652dbd9f38f27178059b6" -dependencies = [ - "serde", - "serde_repr", - "thiserror", -] - [[package]] name = "httparse" version = "1.8.0" diff --git a/frontend/rust-lib/flowy-error/Cargo.toml b/frontend/rust-lib/flowy-error/Cargo.toml index 231f7b3caa..09db6f8d2c 100644 --- a/frontend/rust-lib/flowy-error/Cargo.toml +++ b/frontend/rust-lib/flowy-error/Cargo.toml @@ -17,7 +17,6 @@ serde_json = {version = "1.0", optional = true} serde_repr = { version = "0.1" } serde = "1.0" reqwest = { version = "0.11.14", optional = true, features = ["native-tls-vendored"] } -http-error-code = { git = "https://github.com/AppFlowy-IO/AppFlowy-Server", branch = "refactor/appflowy_server", optional = true } flowy-sqlite = { path = "../flowy-sqlite", optional = true} r2d2 = { version = "0.8", optional = true} url = { version = "2.2", optional = true } @@ -31,7 +30,6 @@ impl_from_dispatch_error = ["lib-dispatch"] impl_from_serde = ["serde_json"] impl_from_reqwest = ["reqwest"] impl_from_sqlite = ["flowy-sqlite", "r2d2"] -impl_from_appflowy_cloud = ["http-error-code"] impl_from_collab = ["collab-database", "collab-document", "impl_from_reqwest"] impl_from_postgres = ["tokio-postgres"] impl_from_tokio= ["tokio"] diff --git a/frontend/rust-lib/flowy-error/src/impl_from/http_server.rs b/frontend/rust-lib/flowy-error/src/impl_from/http_server.rs deleted file mode 100644 index 658d5290a1..0000000000 --- a/frontend/rust-lib/flowy-error/src/impl_from/http_server.rs +++ /dev/null @@ -1,16 +0,0 @@ -use crate::code::ErrorCode; -use http_error_code::ErrorCode as ServerErrorCode; - -impl std::convert::From for ErrorCode { - fn from(code: ServerErrorCode) -> Self { - match code { - ServerErrorCode::UserUnauthorized => ErrorCode::UserUnauthorized, - ServerErrorCode::PasswordNotMatch => ErrorCode::PasswordNotMatch, - ServerErrorCode::RecordNotFound => ErrorCode::RecordNotFound, - ServerErrorCode::ConnectRefused - | ServerErrorCode::ConnectTimeout - | ServerErrorCode::ConnectClose => ErrorCode::HttpError, - _ => ErrorCode::Internal, - } - } -} diff --git a/frontend/rust-lib/flowy-error/src/impl_from/mod.rs b/frontend/rust-lib/flowy-error/src/impl_from/mod.rs index 1c56bf2e9c..ccce462d97 100644 --- a/frontend/rust-lib/flowy-error/src/impl_from/mod.rs +++ b/frontend/rust-lib/flowy-error/src/impl_from/mod.rs @@ -13,9 +13,6 @@ pub mod reqwest; #[cfg(feature = "impl_from_sqlite")] pub mod database; -#[cfg(feature = "impl_from_appflowy_cloud")] -pub mod http_server; - #[cfg(feature = "impl_from_collab")] pub mod collab;