Update src/api.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Félix MARQUET
2025-06-15 17:43:00 +02:00
committed by GitHub
parent 6a0031ac5d
commit 21b51766bb

View File

@@ -118,7 +118,7 @@ async fn add_github_repo(body: RepoRequest, db: Arc<Mutex<Connection>>) -> Resul
Err(e) => {
error!("Error while checking repository: {}", e);
return Ok(warp::reply::with_status(
warp::reply::json(&json!({"error": format!("Database error: {}", e)})),
warp::reply::json(&json!({"error": "An internal server error occurred."})),
StatusCode::INTERNAL_SERVER_ERROR
));
},