Skip to content

Commit

Permalink
server: fix drv_log
Browse files Browse the repository at this point in the history
  • Loading branch information
pnmadelaine committed Oct 1, 2023
1 parent 3aba889 commit 22f8529
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion typhon/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ async fn drv_log(path: web::Json<String>) -> HttpResponse {
});
HttpResponse::Ok().streaming(stream)
}
None => HttpResponse::Ok().body(web::Bytes::from(nix::log(path).await.unwrap())),
None => match nix::log(path).await {
Ok(log) => HttpResponse::Ok().body(web::Bytes::from(log)),
Err(_) => HttpResponse::NotFound().finish(),
},
}
}

Expand Down

0 comments on commit 22f8529

Please sign in to comment.