mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-19 06:20:38 +00:00
fix: correct the error message for snappy compress (#2956)
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
This commit is contained in:
@@ -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 { .. }
|
||||
|
||||
@@ -370,7 +370,7 @@ pub fn snappy_compress(buf: &[u8]) -> Result<Vec<u8>> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user