refactor: Throw 500 error on database connection error instead of panic (#527)

This commit is contained in:
Kartikeya Hegde
2023-02-14 17:14:23 +05:30
committed by GitHub
parent aafb115acb
commit f1e3bf4895
23 changed files with 117 additions and 98 deletions

View File

@ -59,6 +59,8 @@ pub enum StorageError {
entity: &'static str,
key: Option<String>,
},
#[error("Timed out while trying to connect to the database")]
DatabaseConnectionError,
#[error("KV error")]
KVError,
#[error("Serialization failure")]