diff --git a/src/web/middleware/sentry.rs b/src/web/middleware/sentry.rs index 4a4ca95b3c..fd3001ea18 100644 --- a/src/web/middleware/sentry.rs +++ b/src/web/middleware/sentry.rs @@ -1,10 +1,6 @@ use std::task::Context; -use std::{ - cell::{RefCell, RefMut}, - rc::Rc, -}; +use std::{cell::RefCell, rc::Rc}; -use actix_http::Extensions; use actix_web::{ dev::{Service, ServiceRequest, ServiceResponse, Transform}, web::Data, @@ -57,23 +53,6 @@ pub struct SentryWrapperMiddleware { service: Rc>, } -pub fn queue_report(mut ext: RefMut<'_, Extensions>, err: &Error) { - let apie: Option<&ApiError> = err.as_error(); - if let Some(apie) = apie { - if !apie.is_reportable() { - trace!("Sentry Not reporting error: {:?}", err); - return; - } - let event = sentry::integrations::failure::event_from_fail(apie); - if let Some(events) = ext.get_mut::>>() { - events.push(event); - } else { - let events: Vec> = vec![event]; - ext.insert(events); - } - } -} - pub fn report(tags: &Tags, mut event: Event<'static>) { let tags = tags.clone(); event.tags = tags.clone().tag_tree();