Skip to content

Commit 987cf96

Browse files
Taniya Mathurgudivt
authored andcommitted
Fix CloudFormation validation error logging
- Use Rich console.print with markup=False to prevent markup parsing errors - Display readable error message using str(e) instead of JSON formatting - Fixes MarkupError when CloudFormation errors contain square brackets - Remove unnecessary f-string prefix and apply code formatting
1 parent f4a57a7 commit 987cf96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

publish.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,10 @@ def build_main_template(self, webui_zipfile, components_needing_rebuild):
13681368
except ClientError as e:
13691369
# Delete checksum on template validation failure
13701370
self._delete_checksum_file(".checksum")
1371-
self.console.print(f"[red]Template validation failed: {e}[/red]")
1371+
self.console.print(
1372+
"[red]❌ CloudFormation template validation failed[/red]"
1373+
)
1374+
self.console.print(str(e), style="red", markup=False)
13721375
sys.exit(1)
13731376
except Exception as e:
13741377
# Delete checksum on any failure to force rebuild next time

0 commit comments

Comments
 (0)