chiark / gitweb /
error handling
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jul 2020 15:51:58 +0000 (16:51 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jul 2020 15:51:58 +0000 (16:51 +0100)
src/bin/server.rs
src/http.rs

index 04a6ec12300aaebd081c002e66797d6d96f71e18..685045a4947f690a0dabd8f492a0183f16371da8 100644 (file)
@@ -201,7 +201,7 @@ fn api_move(form : Json<ApiMove>) -> impl response::Responder<'static> {
 }
 
 #[get("/_/updates/<ctoken>/<gen>")]
-#[throws(rocket::response::Debug<OE>)]
+#[throws(OE)]
 fn updates(ctoken : InstanceAccess<ClientId>, gen: u64)
            -> impl response::Responder<'static> {
   let gen = Generation(gen);
index 528bbcf4784fc51b3db9d68145a7f171ea780c5b..292466e11984b43ca3f7121ced8d4ff9a1b2aa70 100644 (file)
@@ -8,9 +8,8 @@ impl<'r> Responder<'r> for OnlineError {
   #[throws(Status)]
   fn respond_to(self, req: &Request) -> Response<'r> {
     let msg = format!("Online-layer error\n{:?}\n{}\n", self, self);
-    use rocket::http::Status;//::Continue;
+    use rocket::http::Status;
     use OnlineError::*;
-    let s = rocket::http::Status::Ok;
     let status = match self {
       GameCorrupted => Status::InternalServerError,
       NoClient | NoPlayer => Status::NotFound,