chore: moving to color_eyre

This commit is contained in:
Justin Miller
2021-10-10 19:26:34 -06:00
committed by Aiden McClelland
parent 36bae894a9
commit 81164f974f
38 changed files with 380 additions and 180 deletions

View File

@@ -6,7 +6,7 @@ use std::future::Future;
use std::sync::Arc;
use std::time::Duration;
use anyhow::anyhow;
use color_eyre::eyre::eyre;
use futures::{FutureExt, SinkExt, StreamExt};
use patch_db::json_ptr::JsonPointer;
use patch_db::{Dump, Revision};
@@ -67,7 +67,7 @@ async fn ws_handler<
.into_iter()
.find(|c| c.get_name() == "session")
.ok_or_else(|| {
Error::new(anyhow!("UNAUTHORIZED"), crate::ErrorKind::Authorization)
Error::new(eyre!("UNAUTHORIZED"), crate::ErrorKind::Authorization)
})?;
if let Err(e) =
crate::middleware::auth::is_authed(&ctx, &hash_token(id.get_value())).await