Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wormhole_attester/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wormhole_attester/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions wormhole_attester/client/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ async fn healthcheck_handler() -> Result<impl Reply, Rejection> {
);
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!(
Expand All @@ -161,7 +161,7 @@ async fn healthcheck_handler() -> Result<impl Reply, Rejection> {
} 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))
}
}
}
Expand Down