mirror of
https://github.com/BreizhHardware/ntfy_alerts.git
synced 2026-01-18 16:37:28 +01:00
Update src/api.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -118,7 +118,7 @@ async fn add_github_repo(body: RepoRequest, db: Arc<Mutex<Connection>>) -> Resul
|
|||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Error while checking repository: {}", e);
|
error!("Error while checking repository: {}", e);
|
||||||
return Ok(warp::reply::with_status(
|
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
|
StatusCode::INTERNAL_SERVER_ERROR
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user