diff options
-rw-r--r-- | TODO | 7 | ||||
-rwxr-xr-x | src/main.rs | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/TODO b/TODO index 6aae58a..caba2e8 100644 --- a/TODO +++ b/TODO @@ -39,4 +39,9 @@ about specifically, will allow it to be drawn over the larger one so it will let us see most of both fo them. This is working now with TX/RX because we do more TX than RX, but that could - change and I would rather have it switch with smartness. \ No newline at end of file + change and I would rather have it switch with smartness. + +(7) Stick 404's in the database + Mostly because I think it would be funny to see all the weird + endpoints the crawlers hit, and a bit to know what links I've + killed over the course of time. \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index c036324..b2ac1e9 100755 --- a/src/main.rs +++ b/src/main.rs @@ -147,6 +147,13 @@ async fn handler( ) -> Response { match falible_handler(state, fs, settings, sid, rfr, path).await { Ok(resp) => resp, + Err(RuntimeError::NotFound { source: _, path }) => { + tracing::warn!("[{sid}] 404 on {path}"); + + Response::builder() + .body(Body::from(format!("the path was not found: {path}"))) + .unwrap() + } Err(re) => Response::builder() .body(Body::from(re.to_string())) .unwrap(), |