mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-06-11 10:53:19 +02:00
add some error handling, mostly to quiet warnings
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
use thiserror::Error;
|
||||
|
||||
// for converting a database error into a failed promise
|
||||
use capnp;
|
||||
|
||||
mod raw;
|
||||
|
||||
use miette::{Diagnostic, Severity};
|
||||
@ -79,3 +82,9 @@ impl Diagnostic for Error {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for capnp::Error {
|
||||
fn from(dberr: Error) -> capnp::Error {
|
||||
capnp::Error::failed(format!("database error: {}", dberr.to_string()))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user