diff --git a/src/servers/src/error.rs b/src/servers/src/error.rs index e105b6885ec6..665ecbaae1e3 100644 --- a/src/servers/src/error.rs +++ b/src/servers/src/error.rs @@ -214,6 +214,13 @@ pub enum Error { error: snap::Error, }, + #[snafu(display("Failed to compress prometheus remote request"))] + CompressPromRemoteRequest { + location: Location, + #[snafu(source)] + error: snap::Error, + }, + #[snafu(display("Invalid prometheus remote request, msg: {}", msg))] InvalidPromRemoteRequest { msg: String, location: Location }, @@ -444,6 +451,7 @@ impl ErrorExt for Error { | InvalidOpentsdbJsonRequest { .. } | DecodePromRemoteRequest { .. } | DecodeOtlpRequest { .. } + | CompressPromRemoteRequest { .. } | DecompressPromRemoteRequest { .. } | InvalidPromRemoteRequest { .. } | InvalidFlightTicket { .. } diff --git a/src/servers/src/prom_store.rs b/src/servers/src/prom_store.rs index a0a4725fa861..15183e217a42 100644 --- a/src/servers/src/prom_store.rs +++ b/src/servers/src/prom_store.rs @@ -370,7 +370,7 @@ pub fn snappy_compress(buf: &[u8]) -> Result> { let mut encoder = Encoder::new(); encoder .compress_vec(buf) - .context(error::DecompressPromRemoteRequestSnafu) + .context(error::CompressPromRemoteRequestSnafu) } /// Mock timeseries for test, it is both used in servers and frontend crate