Merge branch 'main' into logheaders

pull/24376/head
kodiakhq[bot] 2021-06-01 17:10:13 +00:00 committed by GitHub
commit 055c6b665a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 5 deletions

View File

@ -98,6 +98,9 @@ pub enum ApplicationError {
WritingPoints {
org: String,
bucket_name: String,
tables: Vec<String>,
num_lines: usize,
body_size: usize,
source: Box<dyn std::error::Error + Send + Sync>,
},
@ -538,11 +541,20 @@ where
server::Error::DatabaseNotFound { .. } => ApplicationError::DatabaseNotFound {
name: db_name.to_string(),
},
_ => ApplicationError::WritingPoints {
org: write_info.org.clone(),
bucket_name: write_info.bucket.clone(),
source: Box::new(e),
},
_ => {
let tables = lines
.iter()
.map(|i| i.series.measurement.to_string())
.collect();
ApplicationError::WritingPoints {
org: write_info.org.clone(),
bucket_name: write_info.bucket.clone(),
tables,
num_lines: lines.len(),
body_size: body.len(),
source: Box::new(e),
}
}
}
})?;