mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +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:
 | 
			
		||||
            check_subdomain_available(subdomain, allow_reserved_subdomain)
 | 
			
		||||
        except ValidationError:
 | 
			
		||||
            raise CommandError("Subdomain reserved: pass --allow-reserved-subdomain to use.")
 | 
			
		||||
        except ValidationError as e:
 | 
			
		||||
            raise CommandError(
 | 
			
		||||
                e.messages[0]
 | 
			
		||||
                + "\nPass --allow-reserved-subdomain to override subdomain restrictions."
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        paths = []
 | 
			
		||||
        for path in options["export_paths"]:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user