putsausta

This commit is contained in:
Jani Pulkkinen
2025-05-30 09:54:57 +03:00
parent 0756da8b7b
commit 4d76217afb

View File

@@ -219,19 +219,10 @@ async fn get_admin_orders() -> impl Responder {
.content_type(APPLICATION_JSON) .content_type(APPLICATION_JSON)
.json(response), .json(response),
Ok(Err(diesel_error)) => { _ => HttpResponse::NotFound()
println!("Diesel error: {:?}", diesel_error);
HttpResponse::InternalServerError()
.content_type(APPLICATION_JSON) .content_type(APPLICATION_JSON)
.body("Database query failed") .await
} .unwrap(),
Err(blocking_error) => {
println!("Blocking error: {:?}", blocking_error);
HttpResponse::InternalServerError()
.content_type(APPLICATION_JSON)
.body("Server thread blocking error")
}
} }
} }