MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / print_error

Function print_error

scripts/agents/devops/src/cli.py:44–57  ·  view source on GitHub ↗

Print a formatted error message to the console. Args: message: The main error message details: Optional details about the error suggestion: Optional suggestion for resolving the error

(message: str, details: Optional[str] = None, suggestion: Optional[str] = None)

Source from the content-addressed store, hash-verified

42}
43
44def print_error(message: str, details: Optional[str] = None, suggestion: Optional[str] = None) -> None:
45 """
46 Print a formatted error message to the console.
47
48 Args:
49 message: The main error message
50 details: Optional details about the error
51 suggestion: Optional suggestion for resolving the error
52 """
53 print(f"{COLORS['red']}{COLORS['bold']}ERROR: {message}{COLORS['reset']}")
54 if details:
55 print(f"{details}")
56 if suggestion:
57 print(f"\n{COLORS['yellow']}SUGGESTION: {suggestion}{COLORS['reset']}")
58
59def handle_cli_error(error: Exception) -> int:
60 """

Callers 4

handle_cli_errorFunction · 0.70
handle_ec2_commandFunction · 0.70
handle_deploy_commandFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected