Skip to content

Commit 745bf75

Browse files
committed
change exception handling to print detail, add echo deployment name.
1 parent 03123e2 commit 745bf75

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

centml/cli/cluster.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def wrapper(*args, **kwargs):
2121
try:
2222
return func(*args, **kwargs)
2323
except ApiException as e:
24-
click.echo(f"Error: {e.reason}")
24+
click.echo(f"Error: {e.body or e.reason}")
2525
return None
2626

2727
return wrapper
@@ -253,7 +253,7 @@ def create():
253253
env_vars=env_vars if env_vars else None
254254
)
255255
created = cclient.create_inference(req)
256-
click.echo(f"Inference deployment created with ID: {created.id}")
256+
click.echo(f"Inference deployment {name} created with ID: {created.id}")
257257

258258
elif depl_type == DeploymentType.COMPUTE_V2:
259259
# For compute deployments, we might ask for a public SSH key
@@ -267,7 +267,7 @@ def create():
267267
ssh_public_key=ssh_key if ssh_key.strip() else None
268268
)
269269
created = cclient.create_compute(req)
270-
click.echo(f"Compute deployment created with ID: {created.id}")
270+
click.echo(f"Compute deployment {name} created with ID: {created.id}")
271271

272272
elif depl_type == DeploymentType.CSERVE:
273273
# For cserve deployments, ask for model and parallelism
@@ -289,7 +289,7 @@ def create():
289289
concurrency=concurrency
290290
)
291291
created = cclient.create_cserve(req)
292-
click.echo(f"CServe deployment created with ID: {created.id}")
292+
click.echo(f"CServe deployment {name} created with ID: {created.id}")
293293

294294
else:
295295
click.echo("Unknown deployment type.")

0 commit comments

Comments
 (0)