Skip to content

Commit c9cf65e

Browse files
committed
CLI: Better common error handling when cloning/removing projects
1 parent b37bdd7 commit c9cf65e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mergin/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,8 @@ def clone(ctx, source_project_path, cloned_project_name, cloned_project_namespac
423423
try:
424424
mc.clone_project(source_project_path, cloned_project_name, cloned_project_namespace)
425425
click.echo("Done")
426+
except ClientError as e:
427+
click.secho("Error: " + str(e), fg="red")
426428
except Exception as e:
427429
_print_unhandled_exception()
428430

@@ -449,6 +451,8 @@ def remove(ctx, project):
449451
try:
450452
mc.delete_project(f"{namespace}/{project}")
451453
click.echo("Remote project removed")
454+
except ClientError as e:
455+
click.secho("Error: " + str(e), fg="red")
452456
except Exception as e:
453457
_print_unhandled_exception()
454458

0 commit comments

Comments
 (0)