Use concrete Error for Signer

This commit is contained in:
Kitaiti Makoto
2021-12-05 19:32:27 +09:00
parent 0da9572627
commit 858806149a
4 changed files with 29 additions and 22 deletions
+7 -1
View File
@@ -17,7 +17,7 @@ extern crate serde_json;
extern crate tantivy;
use once_cell::sync::Lazy;
use plume_common::activity_pub::inbox::InboxError;
use plume_common::activity_pub::{inbox::InboxError, sign};
use posts::PostEvent;
use riker::actors::{channel, ActorSystem, ChannelRef, SystemBuilder};
use users::UserEvent;
@@ -79,6 +79,12 @@ impl From<openssl::error::ErrorStack> for Error {
}
}
impl From<sign::Error> for Error {
fn from(_: sign::Error) -> Self {
Error::Signature
}
}
impl From<diesel::result::Error> for Error {
fn from(err: diesel::result::Error) -> Self {
Error::Db(err)