Change error printing to eprintln
This commit is contained in:
@@ -62,7 +62,7 @@ async fn add_rating(
|
||||
{
|
||||
Ok(_) => (StatusCode::OK, "Done.").into_response(),
|
||||
Err(e) => {
|
||||
println!("HTTP error: {e}");
|
||||
eprintln!("HTTP error: {e}");
|
||||
(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(),
|
||||
Err(e) => {
|
||||
println!("HTTP error: {e}");
|
||||
eprintln!("HTTP error: {e}");
|
||||
(StatusCode::BAD_REQUEST, e.to_string()).into_response()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user