MCPcopy Create free account
hub / github.com/ArcadeAI/arcade-mcp / handle_cli_error

Function handle_cli_error

libs/arcade-cli/arcade_cli/utils.py:384–399  ·  view source on GitHub ↗

Handle CLI error reporting with optional debug traceback and exit.

(
    message: str,
    error: Exception | None = None,
    debug: bool = True,
    should_exit: bool = True,
)

Source from the content-addressed store, hash-verified

382
383
384def handle_cli_error(
385 message: str,
386 error: Exception | None = None,
387 debug: bool = True,
388 should_exit: bool = True,
389) -> None:
390 """Handle CLI error reporting with optional debug traceback and exit."""
391 if error and debug:
392 console.print(f"❌ {message}: {traceback.format_exc()}", style="bold red")
393 elif error:
394 console.print(f"❌ {message}: {escape(str(error))}", style="bold red")
395 else:
396 console.print(f"❌ {escape(message)}", style="bold red")
397
398 if should_exit:
399 raise CLIError(message, error)
400
401
402def create_cli_catalog(

Callers 15

project_listFunction · 0.90
project_setFunction · 0.90
show_logicFunction · 0.90
list_serversFunction · 0.90
get_serverFunction · 0.90
enable_serverFunction · 0.90
disable_serverFunction · 0.90
delete_serverFunction · 0.90
get_server_logsFunction · 0.90
_display_deployment_logsFunction · 0.90
_stream_deployment_logsFunction · 0.90
org_listFunction · 0.90

Calls 1

CLIErrorClass · 0.85

Tested by

no test coverage detected