diff --git a/wormhole_attester/Cargo.lock b/wormhole_attester/Cargo.lock index 7b9420b7..aac12e23 100644 --- a/wormhole_attester/Cargo.lock +++ b/wormhole_attester/Cargo.lock @@ -2699,7 +2699,7 @@ dependencies = [ [[package]] name = "pyth-wormhole-attester-client" -version = "4.0.0" +version = "4.1.0" dependencies = [ "borsh", "clap 3.1.18", diff --git a/wormhole_attester/client/Cargo.toml b/wormhole_attester/client/Cargo.toml index a9912f89..03f15544 100644 --- a/wormhole_attester/client/Cargo.toml +++ b/wormhole_attester/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-wormhole-attester-client" -version = "4.0.0" +version = "4.1.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wormhole_attester/client/src/util.rs b/wormhole_attester/client/src/util.rs index 4544d89a..2acdee0a 100644 --- a/wormhole_attester/client/src/util.rs +++ b/wormhole_attester/client/src/util.rs @@ -142,15 +142,15 @@ async fn healthcheck_handler() -> Result { ); Ok(reply::with_status(msg, StatusCode::OK)) } - // Unhealthy - 503 Service Unavailable + // Unhealthy - 500 Internal Server Error Some(false) => { let msg = format!( "unhealthy, all of {} latest attestations returned error", hc_state.max_window_size ); - Ok(reply::with_status(msg, StatusCode::SERVICE_UNAVAILABLE)) + Ok(reply::with_status(msg, StatusCode::INTERNAL_SERVER_ERROR)) } - // No data - 307 Temporary Redirect + // No data - 503 Service Unavailable None => { let msg = if hc_state.enable { format!( @@ -161,7 +161,7 @@ async fn healthcheck_handler() -> Result { } else { "Healthcheck disabled (enable_healthcheck is false)".to_string() }; - Ok(reply::with_status(msg, StatusCode::TEMPORARY_REDIRECT)) + Ok(reply::with_status(msg, StatusCode::SERVICE_UNAVAILABLE)) } } }