Skip to content
Snippets Groups Projects
Commit a6af55c2 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Catch exception for nicer UX

parent cd273121
Branches
Tags
No related merge requests found
......@@ -33,6 +33,7 @@ from argparse import ArgumentParser, RawDescriptionHelpFormatter
import caosdb as db
from caosdb import administration as admin
from caosdb.exceptions import ClientErrorException
__all__ = []
__version__ = 0.3
......@@ -119,8 +120,11 @@ def do_create_user(args):
if args.ask_password is True:
password = _promt_for_pw()
admin._insert_user(name=args.user_name,
email=args.user_email, password=password)
try:
admin._insert_user(name=args.user_name,
email=args.user_email, password=password)
except ClientErrorException as e:
print(e.msg)
def do_activate_user(args):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment