Define error response format and refactor error handling

This commit is contained in:
oxalica 2024-08-30 23:54:16 -04:00
parent 4ceffe3f31
commit 4937502d4c
6 changed files with 341 additions and 195 deletions

23
Cargo.lock generated
View file

@ -177,6 +177,28 @@ dependencies = [
"tracing",
]
[[package]]
name = "axum-extra"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0be6ea09c9b96cb5076af0de2e383bd2bc0c18f827cf1967bdd353e0b910d733"
dependencies = [
"axum",
"axum-core",
"bytes",
"futures-util",
"http",
"http-body",
"http-body-util",
"mime",
"pin-project-lite",
"serde",
"tower",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "backtrace"
version = "0.3.73"
@ -257,6 +279,7 @@ version = "0.0.0"
dependencies = [
"anyhow",
"axum",
"axum-extra",
"blah",
"clap",
"ed25519-dalek",