diff --git a/src/bin/nixos-validator.rs b/src/bin/nixos-validator.rs index ae3435e..0bbfc2b 100644 --- a/src/bin/nixos-validator.rs +++ b/src/bin/nixos-validator.rs @@ -128,7 +128,7 @@ async fn check(State(app_state): State<AppState>, Query(params): Query<HashMap<S .map_err(|_err| (StatusCode::INTERNAL_SERVER_ERROR, "Invalid response from Prometheus"))?; let current_system_hash = prometheus_body["data"]["result"][0]["metric"]["hash"].as_str() - .ok_or_else(|| (StatusCode::INTERNAL_SERVER_ERROR, "No current metric found in Prometheus"))?; + .ok_or_else(|| (StatusCode::NOT_FOUND, "No current metric found in Prometheus"))?; let hydra_req = client.get(format!("{}/job/{}/latest", app_state.hydra_url, app_state.hydra_job_template.clone().replace("{}", target))) .header("Accept", "application/json")