mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
import: Fix propagation of subdomain error messages.
The previous logic would provide a very confusing error message if the subdomain was already in use.
This commit is contained in:
@@ -77,8 +77,11 @@ import a database dump from one or more JSON files."""
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
check_subdomain_available(subdomain, allow_reserved_subdomain)
|
check_subdomain_available(subdomain, allow_reserved_subdomain)
|
||||||
except ValidationError:
|
except ValidationError as e:
|
||||||
raise CommandError("Subdomain reserved: pass --allow-reserved-subdomain to use.")
|
raise CommandError(
|
||||||
|
e.messages[0]
|
||||||
|
+ "\nPass --allow-reserved-subdomain to override subdomain restrictions."
|
||||||
|
)
|
||||||
|
|
||||||
paths = []
|
paths = []
|
||||||
for path in options["export_paths"]:
|
for path in options["export_paths"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user