Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore: suppress error in search upload handler for file type not found (#2345)

gbirmanedbf36605997
diff --git a/rust/cloud-storage/search_upload_handler/src/handler.rs b/rust/cloud-storage/search_upload_handler/src/handler.rs
index dea36f20f5..c4226ecf01 100644
--- a/rust/cloud-storage/search_upload_handler/src/handler.rs
+++ b/rust/cloud-storage/search_upload_handler/src/handler.rs
@@ -49,9 +49,13 @@ pub async fn handler(
.context("Failed to fetch document basic info")?
.ok_or_else(|| anyhow::anyhow!("document not found"))?;
- let file_type = document_basic
- .try_file_type()
- .ok_or_else(|| anyhow::anyhow!("file type not found"))?;
+ let file_type = match document_basic.try_file_type() {
+ Some(file_type) => file_type,
+ None => {
+ tracing::trace!(document_id=?document_id, "no file type found");
+ return Ok(());
+ }
+ };
let search_extractor_message = SearchExtractorMessage {
user_id: document_basic.owner.to_string(),
diff --git a/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip
index bd9370f0e3..899c01aef3 100644
Binary files a/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip differ