From 8875c6f5baab17253c67bd39b56251de27d32cd3 Mon Sep 17 00:00:00 2001 From: Ben Lovell Date: Fri, 27 Feb 2026 18:19:40 +0100 Subject: [PATCH] feat: pass through error messages from backend when runs fail --- crates/tower-cmd/src/output.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/tower-cmd/src/output.rs b/crates/tower-cmd/src/output.rs index b4b6eb46..2dfcd709 100644 --- a/crates/tower-cmd/src/output.rs +++ b/crates/tower-cmd/src/output.rs @@ -298,7 +298,6 @@ fn output_response_content_error(err: ResponseContent) { match err.status { StatusCode::CONFLICT => { - error("There was a conflict while trying to do that!"); output_full_error_details(&error_model); } StatusCode::UNPROCESSABLE_ENTITY => { @@ -316,7 +315,10 @@ fn output_response_content_error(err: ResponseContent) { ); } _ => { - error("The Tower API returned an error that the Tower CLI doesn't know what to do with! Maybe try again in a bit."); + if error_model.detail.is_none() && error_model.errors.is_none() { + error("The Tower API returned an error that the Tower CLI doesn't know what to do with! Maybe try again in a bit."); + } + output_full_error_details(&error_model); } } }