From 24082cb9eca136f8e1fc3dea51e1e6229017f65e Mon Sep 17 00:00:00 2001 From: Kyler Chin <7539174+kylerchin@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:20:46 -0700 Subject: [PATCH] Print that there was an error reading chateaus from postgres --- src/aspen/leader_thread.rs | 2 ++ src/birch/server.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/aspen/leader_thread.rs b/src/aspen/leader_thread.rs index dd335c6b..951c3164 100644 --- a/src/aspen/leader_thread.rs +++ b/src/aspen/leader_thread.rs @@ -246,6 +246,8 @@ pub async fn aspen_leader_thread( std::mem::drop(workers_nodes_lock); std::mem::drop(chateau_list_lock); + } else { + println!("Error reading chateaus from postgres"); } } diff --git a/src/birch/server.rs b/src/birch/server.rs index f3af3fef..5810d81f 100644 --- a/src/birch/server.rs +++ b/src/birch/server.rs @@ -276,6 +276,10 @@ pub async fn rail_stops( ) -> impl Responder { let (z, x, y) = path.into_inner(); + if (z < 4) { + return HttpResponse::BadRequest().body("Zoom level too low"); + } + //let grid = tile_grid::Grid::wgs84(); // let bbox = grid.tile_extent(x, y, z);