Error handling with thiserror and anyhow

This commit is contained in:
Alphonse Paix
2025-08-26 12:47:22 +02:00
parent fccb79c57f
commit 684519f689
5 changed files with 133 additions and 49 deletions

8
Cargo.lock generated
View File

@@ -60,6 +60,12 @@ dependencies = [
"libc",
]
[[package]]
name = "anyhow"
version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
[[package]]
name = "arraydeque"
version = "0.5.1"
@@ -3377,6 +3383,7 @@ dependencies = [
name = "zero2prod"
version = "0.1.0"
dependencies = [
"anyhow",
"axum",
"chrono",
"claims",
@@ -3393,6 +3400,7 @@ dependencies = [
"serde-aux",
"serde_json",
"sqlx",
"thiserror",
"tokio",
"tower-http",
"tracing",