Commit 9921058
authored
fix: improve CLI error messages in register and policy commands (#314)
The register command did a bare import of AgentIdentity inside the function body with no error handling. If agentmesh is not installed, Python dumps a raw traceback instead of a clear message. Wrapped the import in a try/except ImportError block that tells the user what to run. The policy command caught all exceptions as a single bare Exception and printed only the error object. Split it into FileNotFoundError, JSON/YAML parse errors, and a general fallback so each case gives a message that points to the actual problem. Related to issue #307.1 parent a8d35fd commit 9921058
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
| |||
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
359 | 367 | | |
360 | | - | |
| 368 | + | |
361 | 369 | | |
362 | 370 | | |
363 | 371 | | |
| |||
0 commit comments