diff --git a/src/internal_events/http.rs b/src/internal_events/http.rs index 9a1cd2ea20137..a1879c2379bcb 100644 --- a/src/internal_events/http.rs +++ b/src/internal_events/http.rs @@ -130,11 +130,11 @@ impl<'a> InternalEvent for HttpDecompressError<'a> { } } -pub struct HttpInternalError { - pub message: &'static str, +pub struct HttpInternalError<'a> { + pub message: &'a str, } -impl InternalEvent for HttpInternalError { +impl<'a> InternalEvent for HttpInternalError<'a> { fn emit(self) { error!( message = %self.message, diff --git a/src/sources/util/http/prelude.rs b/src/sources/util/http/prelude.rs index 3b07c38a1da9b..26f073f7bb7d1 100644 --- a/src/sources/util/http/prelude.rs +++ b/src/sources/util/http/prelude.rs @@ -165,7 +165,7 @@ pub trait HttpSource: Clone + Send + Sync + 'static { } else { //other internal error - will return 500 internal server error emit!(HttpInternalError { - message: "Internal error." + message: &format!("Internal error: {:?}", r) }); Err(r) }