improve error management with thiserror use

- add thiserror dependency
- use distinct Error enum in lib and server
This commit is contained in:
Gwen Lg
2024-06-13 23:01:43 +02:00
parent 0d43729a02
commit 1ad5dfbe78
4 changed files with 112 additions and 32 deletions

21
Cargo.lock generated
View File

@ -512,6 +512,7 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
"thiserror",
"tokio",
"zip",
]
@ -1495,6 +1496,26 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "thiserror"
version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "time"
version = "0.3.36"