Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error refactor #143

Merged
merged 8 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ database-entity = { path = "libs/database-entity" }
gotrue = { path = "libs/gotrue" }
gotrue-entity = { path = "libs/gotrue-entity" }
infra = { path = "libs/infra" }
app-error = { workspace = true, features = ["sqlx_error", "actix_web_error"] }
shared_entity = { path = "libs/shared-entity", features = ["cloud"] }
itertools = "0.11"
axum_session = "0.7.0"
Expand Down Expand Up @@ -114,10 +115,12 @@ members = [
"libs/gotrue",
"libs/gotrue-entity",
"admin_frontend",
"libs/app_error",
]

[workspace.dependencies]
realtime-entity = { path = "libs/realtime-entity" }
app-error = { path = "libs/app_error" }

[profile.release]
lto = true
Expand All @@ -134,8 +137,8 @@ lto = false
opt-level = 3

[patch.crates-io]
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "c23dff3" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "c23dff3" }
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8861d7a" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8861d7a" }

# Comment the above and uncomment the below to use local version of collab by cloning the repo and placing it in libs folder
#collab = { path = "libs/AppFlowy-Collab/collab" }
Expand Down
2 changes: 1 addition & 1 deletion admin_frontend/src/web_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub async fn invite_handler(
},
)
.await?;
Ok(().into())
Ok(WebApiResponse::from(()))
}

pub async fn change_password_handler(
Expand Down
28 changes: 28 additions & 0 deletions libs/app_error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "app-error"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
thiserror = "1.0.47"
serde_repr = "0.1.16"
serde = { version = "1.0"}
anyhow = "1.0.75"
uuid = { version = "1.4.1", features = ["v4"] }
sqlx = { version = "0.7", default-features = false, features = ["postgres", "json"], optional = true }
validator = { version = "0.16", optional = true }
rust-s3 = { version = "0.33.0", optional = true }
url = { version = "2.4.1"}
actix-web = { version = "4.3.1", optional = true }
reqwest = { version = "0.11", optional = true }
serde_json = "1.0.107"

[features]
default = []
sqlx_error = ["sqlx"]
validation_error = ["validator"]
s3_error = ["rust-s3"]
actix_web_error = ["actix-web"]
gotrue_error= ["reqwest"]
File renamed without changes.
Loading