diff options
author | Vika <vika@fireburn.ru> | 2022-07-19 03:09:37 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-07-19 03:09:37 +0300 |
commit | 6fdb4c25c4557aa0b59b5c4ba348ecab502cb57e (patch) | |
tree | fb412dc81ae1702958c3cc852cf140d9eace54b2 /kittybox-rs/Cargo.toml | |
parent | c00547c8437b992aa073378ab165aa40b073e1b4 (diff) | |
download | kittybox-6fdb4c25c4557aa0b59b5c4ba348ecab502cb57e.tar.zst |
Catch panics on requests
This will allow to display a prettier error page in the future. There is a possibility of instantiating the panic handler per-module to allow for custom panic messages expressed in the same form the module itself gives error messages (e.g. pretty HTML for frontend, MicropubError for Micropub messages etc.)
Diffstat (limited to 'kittybox-rs/Cargo.toml')
-rw-r--r-- | kittybox-rs/Cargo.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kittybox-rs/Cargo.toml b/kittybox-rs/Cargo.toml index 5a3ae90..1d1d9fd 100644 --- a/kittybox-rs/Cargo.toml +++ b/kittybox-rs/Cargo.toml @@ -72,7 +72,7 @@ sha2 = "^0.9.8" # SHA-2 series of algorithms for Rust tracing = { version = "0.1.34", features = [] } tracing-tree = "0.2.1" tracing-subscriber = { version = "0.3.11", features = ["env-filter", "json"] } -tower-http = { version = "0.3.3", features = ["trace", "cors"] } +tower-http = { version = "0.3.3", features = ["trace", "cors", "catch-panic"] } tower = { version = "0.4.12", features = ["tracing"] } tracing-log = "0.1.3" [dependencies.tokio] |