Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
16 changes: 12 additions & 4 deletions crates/manual/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,28 @@ impl RemoteRuntime for RemoteNatsClient {
let message = match res {
Comment on lines 34 to 38

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in taurus: the "Publishing to topic" log is emitted after awaiting the request and will be printed even when the request fails. Log before sending the request and you can remove the topic.clone().

Copilot uses AI. Check for mistakes.
Ok(r) => r,
Err(err) => {
return Err(RuntimeError::simple(
log::error!(
"RemoteRuntimeExeption: failed to handle NATS message: {}",
Comment thread
raphael-goetz marked this conversation as resolved.
err
);
return Err(RuntimeError::simple_str(
"RemoteRuntimeExeption",
format!("Failed to handle NATS message {:?}", err),
"Failed to recieve any response messages from a remote runtime.",
Comment thread
raphael-goetz marked this conversation as resolved.
Outdated

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change drops the underlying NATS error from the returned RuntimeError message (it’s only logged). Since this is a CLI tool and logging configuration can vary, consider including err in the RuntimeError message as well to keep the surfaced failure actionable.

Suggested change
"Failed to recieve any response messages from a remote runtime.",
&format!(
"Failed to recieve any response messages from a remote runtime: {}",
err
),

Copilot uses AI. Check for mistakes.
));
}
};

let decode_result = ExecutionResult::decode(message.payload);
let execution_result = match decode_result {
Ok(r) => r,
Err(_) => {
Err(err) => {
log::error!(
"RemoteRuntimeExeption: failed to decode NATS message: {}",
err
);
return Err(RuntimeError::simple_str(
"RemoteRuntimeExeption",
"Failed to decode NATS message",
"Failed to read Remote Response",
));
}
};
Expand Down
19 changes: 14 additions & 5 deletions crates/taurus/src/remote/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,33 @@ impl RemoteRuntime for RemoteNatsClient {
) -> Result<Value, RuntimeError> {
let topic = format!("action.{}.{}", remote_name, request.execution_identifier);
let payload = request.encode_to_vec();
let res = self.client.request(topic, payload.into()).await;
let res = self.client.request(topic.clone(), payload.into()).await;
log::info!("Publishing to topic: {}", topic);
Comment thread
raphael-goetz marked this conversation as resolved.
Outdated
let message = match res {
Ok(r) => r,
Err(_) => {
Err(err) => {
log::error!(
"RemoteRuntimeExeption: failed to handle NATS message: {}",
err
);
Comment on lines +33 to +37

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error log says "failed to handle NATS message", but this branch is for client.request(...) failing (send request / await reply). Updating the wording will make the logs and returned RuntimeError easier to interpret.

Copilot uses AI. Check for mistakes.
return Err(RuntimeError::simple_str(
"RemoteRuntimeExeption",
"Failed to handle NATS message",
"Failed to recieve any response messages from a remote runtime.",
Comment thread
raphael-goetz marked this conversation as resolved.
Outdated
));
}
};

let decode_result = ExecutionResult::decode(message.payload);
let execution_result = match decode_result {
Ok(r) => r,
Err(_) => {
Err(err) => {
log::error!(
"RemoteRuntimeExeption: failed to decode NATS message: {}",
err
);
return Err(RuntimeError::simple_str(
"RemoteRuntimeExeption",
"Failed to decode NATS message",
"Failed to read Remote Response",
));
}
};
Expand Down