diff --git a/server-api/src/channels.rs b/server-api/src/channels.rs index d5be622..d27ed2a 100644 --- a/server-api/src/channels.rs +++ b/server-api/src/channels.rs @@ -78,8 +78,14 @@ pub async fn delete_channel(pool: &Pool, response: &mut Response, params: // TODO: something more intelligent with the logging im ngl match Channel::delete(pool, id).await { db::Response::Success => {}, - db::Response::Other(data) => println!("\t{}", data), - _ => {} + db::Response::Other(data) => { + eprintln!("\t{}", data); + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + } + _ => { + eprintln!("\tBro like restart the server"); + *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + } } } else {