This commit is contained in:
Kenneth Kehl
2024-08-15 10:31:02 -07:00
parent 714f6f1588
commit 146f0cc787
20 changed files with 113 additions and 92 deletions

View File

@@ -46,8 +46,7 @@ def handle_integrity_error(exc):
"""
Handle integrity errors caused by the unique constraint on ix_organization_name
"""
print(exc)
current_app.logger.exception(exc)
current_app.logger.exception("Handling integrity error", exc_info=True)
if "ix_organization_name" in str(exc):
return jsonify(result="error", message="Organization name already exists"), 400
if 'duplicate key value violates unique constraint "domain_pkey"' in str(exc):