diff --git a/src/indexer.rs b/src/indexer.rs index 793c582..2675c22 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -455,7 +455,7 @@ pub async fn index_server(server: Arc, host: String) -> Result<()> { let mut active_indexers = server.active_indexers.lock().await; if active_indexers.contains(&host) { - bail!("Indexer already running for host {}", &host); + bail!("Indexer already running for host"); } active_indexers.insert(host.clone()); diff --git a/src/request_crawl.rs b/src/request_crawl.rs index 1ea2b2f..9215533 100644 --- a/src/request_crawl.rs +++ b/src/request_crawl.rs @@ -21,9 +21,12 @@ pub async fn handle_request_crawl( Ok(input) => input, Err(_) => { // TODO: surely we can build out an XRPC abstraction or something - return Ok(Response::builder().status(400).body(body_full( - r#"{"error":"InvalidRequest","message":"Failed to parse request body"}"#, - ))?); + return Ok(Response::builder() + .status(400) + .header("Content-Type", "application/json") + .body(body_full( + r#"{"error":"InvalidRequest","message":"Failed to parse request body"}"#, + ))?); } }; @@ -36,5 +39,6 @@ pub async fn handle_request_crawl( Ok(Response::builder() .status(200) + .header("Content-Type", "application/json") .body(body_full(r#"{"status":"ok"}"#))?) }