Change error printing to eprintln

This commit is contained in:
2025-04-18 10:14:52 +02:00
parent c508f80e6f
commit 41c0dd1957

View File

@@ -62,7 +62,7 @@ async fn add_rating(
{ {
Ok(_) => (StatusCode::OK, "Done.").into_response(), Ok(_) => (StatusCode::OK, "Done.").into_response(),
Err(e) => { Err(e) => {
println!("HTTP error: {e}"); eprintln!("HTTP error: {e}");
(StatusCode::BAD_REQUEST, e.to_string()).into_response() (StatusCode::BAD_REQUEST, e.to_string()).into_response()
} }
} }
@@ -88,7 +88,7 @@ async fn add_userid(Path(user_id): Path<i64>, State(shared): State<SharedState>)
{ {
Ok(_) => (StatusCode::OK, "Done.").into_response(), Ok(_) => (StatusCode::OK, "Done.").into_response(),
Err(e) => { Err(e) => {
println!("HTTP error: {e}"); eprintln!("HTTP error: {e}");
(StatusCode::BAD_REQUEST, e.to_string()).into_response() (StatusCode::BAD_REQUEST, e.to_string()).into_response()
} }
} }