summaryrefslogtreecommitdiff
path: root/dichroism/src/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dichroism/src/handlers.rs')
-rw-r--r--dichroism/src/handlers.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/dichroism/src/handlers.rs b/dichroism/src/handlers.rs
index ccaf347..8dd0f3b 100644
--- a/dichroism/src/handlers.rs
+++ b/dichroism/src/handlers.rs
@@ -8,7 +8,6 @@ use actix_web::{get, patch, post, web, Error, HttpResponse, Responder};
use futures::{StreamExt, TryStreamExt};
fn to_internal_error(e: impl std::error::Error) -> HttpResponse {
- eprintln!("{}", e);
HttpResponse::InternalServerError().body(e.to_string())
}
@@ -120,10 +119,7 @@ async fn post_photo(
// create new photo_set
let photo_set = web::block(move || image_service::generate_photo_set(&data))
.await
- .map_err(|e| {
- eprintln!("{}", e.to_string());
- HttpResponse::InternalServerError().body(e.to_string())
- })?;
+ .map_err(to_internal_error)?;
let conn = pool.get().map_err(to_internal_error)?;
let photo_set = web::block(move || photo_set_repo::store(&conn, photo_set))
.await