Update standalone/pherry/src/endpoint.rs
@@ -39,13 +39,10 @@ pub async fn try_update_worker_endpoint(
args: &Args,
) -> Result<bool> {
let info = pr.get_endpoint_info(()).await?;
- if info.encoded_endpoint_payload.is_none() {
- // Early return if no endpoint payload is available
- return Ok(false);
- }
- let encoded_endpoint_payload = info
- .encoded_endpoint_payload
- .expect("Endpoint payload should be available");
+ let encoded_endpoint_payload = match info.encoded_endpoint_payload {
+ None => return Ok(false), // Early return if no endpoint payload is available
+ Some(payload) => payload,
+ };
let signature = info.signature.ok_or(anyhow!("No endpoint signature"))?;
info!("Binding worker's endpoint...");
update_worker_endpoint(&para_api, encoded_endpoint_payload, signature, signer, args).await
